{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "8517fb87-9b39-475e-b027-2a74db6a467b",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "import pandas as pd \n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "plt.rcParams['font.sans-serif']='SimSun'   # rc参数默认英文，中文会报错，将其设为微软雅黑\n",
    "#plt.rcParams['font.family'] = 'Times New Roman'\n",
    "plt.rcParams['axes.unicode_minus']=False  # rc参数默认正数，调整可显示负数\n",
    "plt.rcParams['font.size']=30 # 设置字体大小\n",
    "%matplotlib inline\n",
    "import warnings\n",
    "warnings.filterwarnings(\"ignore\") #忽略警告信息\n",
    "import seaborn as sns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "5420f4b2-72dd-41ce-8d8a-b914d912f363",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "df_16=pd.read_csv(r'数据\\16修正指标1.csv')\n",
    "df_17=pd.read_csv(r'数据\\17修正指标1.csv')\n",
    "df_18=pd.read_csv(r'数据\\18修正指标1.csv')\n",
    "df_19=pd.read_csv(r'数据\\19修正指标1.csv')\n",
    "df_20=pd.read_csv(r'数据\\20修正指标1.csv')\n",
    "df_21=pd.read_csv(r'数据\\21修正指标1.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "08a446e9-c3eb-465f-b162-561592200c7c",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>NAME</th>\n",
       "      <th>1007AvgSurfT_inst</th>\n",
       "      <th>1015AvgSurfT_inst</th>\n",
       "      <th>1023AvgSurfT_inst</th>\n",
       "      <th>1031AvgSurfT_inst</th>\n",
       "      <th>1108AvgSurfT_inst</th>\n",
       "      <th>1116AvgSurfT_inst</th>\n",
       "      <th>1124AvgSurfT_inst</th>\n",
       "      <th>1202AvgSurfT_inst</th>\n",
       "      <th>1210AvgSurfT_inst</th>\n",
       "      <th>...</th>\n",
       "      <th>0330wet</th>\n",
       "      <th>0407wet</th>\n",
       "      <th>0415wet</th>\n",
       "      <th>0423wet</th>\n",
       "      <th>0501wet</th>\n",
       "      <th>0509wet</th>\n",
       "      <th>0517wet</th>\n",
       "      <th>0525wet</th>\n",
       "      <th>0602wet</th>\n",
       "      <th>2016年小麦亩产</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>410522</td>\n",
       "      <td>289.267970</td>\n",
       "      <td>289.607714</td>\n",
       "      <td>284.198419</td>\n",
       "      <td>282.499874</td>\n",
       "      <td>282.153628</td>\n",
       "      <td>278.815665</td>\n",
       "      <td>276.589993</td>\n",
       "      <td>278.381273</td>\n",
       "      <td>275.111139</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.128518</td>\n",
       "      <td>-0.064188</td>\n",
       "      <td>-0.116760</td>\n",
       "      <td>-0.096134</td>\n",
       "      <td>-0.089233</td>\n",
       "      <td>-0.108190</td>\n",
       "      <td>-0.127928</td>\n",
       "      <td>-0.101819</td>\n",
       "      <td>-0.146393</td>\n",
       "      <td>6293.602209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>410421</td>\n",
       "      <td>290.792832</td>\n",
       "      <td>291.749905</td>\n",
       "      <td>284.957157</td>\n",
       "      <td>284.889942</td>\n",
       "      <td>283.633298</td>\n",
       "      <td>281.702103</td>\n",
       "      <td>277.873141</td>\n",
       "      <td>281.077626</td>\n",
       "      <td>277.286874</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.108769</td>\n",
       "      <td>-0.101318</td>\n",
       "      <td>-0.100954</td>\n",
       "      <td>-0.119105</td>\n",
       "      <td>-0.098386</td>\n",
       "      <td>-0.117942</td>\n",
       "      <td>-0.135547</td>\n",
       "      <td>-0.154707</td>\n",
       "      <td>-0.182618</td>\n",
       "      <td>5445.018049</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>411726</td>\n",
       "      <td>290.104474</td>\n",
       "      <td>291.369130</td>\n",
       "      <td>284.662735</td>\n",
       "      <td>284.599967</td>\n",
       "      <td>283.525928</td>\n",
       "      <td>282.031064</td>\n",
       "      <td>278.567309</td>\n",
       "      <td>281.479865</td>\n",
       "      <td>278.213156</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.122235</td>\n",
       "      <td>-0.128738</td>\n",
       "      <td>-0.143569</td>\n",
       "      <td>-0.143309</td>\n",
       "      <td>-0.101453</td>\n",
       "      <td>-0.133007</td>\n",
       "      <td>-0.169093</td>\n",
       "      <td>-0.172815</td>\n",
       "      <td>-0.175776</td>\n",
       "      <td>5700.138515</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>410822</td>\n",
       "      <td>291.470376</td>\n",
       "      <td>291.976974</td>\n",
       "      <td>285.966020</td>\n",
       "      <td>285.081208</td>\n",
       "      <td>284.030063</td>\n",
       "      <td>281.088398</td>\n",
       "      <td>278.294676</td>\n",
       "      <td>280.440744</td>\n",
       "      <td>276.371585</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.090432</td>\n",
       "      <td>-0.098571</td>\n",
       "      <td>-0.094352</td>\n",
       "      <td>-0.096503</td>\n",
       "      <td>-0.079822</td>\n",
       "      <td>-0.094260</td>\n",
       "      <td>-0.119584</td>\n",
       "      <td>-0.101219</td>\n",
       "      <td>-0.148965</td>\n",
       "      <td>7960.532217</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>411082</td>\n",
       "      <td>290.781240</td>\n",
       "      <td>291.381349</td>\n",
       "      <td>284.829544</td>\n",
       "      <td>284.482888</td>\n",
       "      <td>283.607316</td>\n",
       "      <td>281.315313</td>\n",
       "      <td>277.356142</td>\n",
       "      <td>280.857730</td>\n",
       "      <td>277.138784</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.104100</td>\n",
       "      <td>-0.091168</td>\n",
       "      <td>-0.105842</td>\n",
       "      <td>-0.108215</td>\n",
       "      <td>-0.085076</td>\n",
       "      <td>-0.109715</td>\n",
       "      <td>-0.120607</td>\n",
       "      <td>-0.149887</td>\n",
       "      <td>-0.185996</td>\n",
       "      <td>7515.676393</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>411081</td>\n",
       "      <td>290.492117</td>\n",
       "      <td>291.137083</td>\n",
       "      <td>284.656203</td>\n",
       "      <td>284.314321</td>\n",
       "      <td>283.230126</td>\n",
       "      <td>281.058892</td>\n",
       "      <td>276.996953</td>\n",
       "      <td>280.644978</td>\n",
       "      <td>276.846233</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.106409</td>\n",
       "      <td>-0.100915</td>\n",
       "      <td>-0.108755</td>\n",
       "      <td>-0.112778</td>\n",
       "      <td>-0.096975</td>\n",
       "      <td>-0.121093</td>\n",
       "      <td>-0.146088</td>\n",
       "      <td>-0.145152</td>\n",
       "      <td>-0.188275</td>\n",
       "      <td>6179.400354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>411424</td>\n",
       "      <td>290.480466</td>\n",
       "      <td>291.144719</td>\n",
       "      <td>285.300452</td>\n",
       "      <td>284.801620</td>\n",
       "      <td>284.250235</td>\n",
       "      <td>282.018702</td>\n",
       "      <td>278.046128</td>\n",
       "      <td>280.788775</td>\n",
       "      <td>277.985123</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.119064</td>\n",
       "      <td>-0.090531</td>\n",
       "      <td>-0.102692</td>\n",
       "      <td>-0.095873</td>\n",
       "      <td>-0.081536</td>\n",
       "      <td>-0.103858</td>\n",
       "      <td>-0.139242</td>\n",
       "      <td>-0.170361</td>\n",
       "      <td>-0.168860</td>\n",
       "      <td>7380.460870</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>411724</td>\n",
       "      <td>291.166128</td>\n",
       "      <td>291.765982</td>\n",
       "      <td>285.729775</td>\n",
       "      <td>285.499801</td>\n",
       "      <td>284.553301</td>\n",
       "      <td>283.242707</td>\n",
       "      <td>278.909748</td>\n",
       "      <td>281.838617</td>\n",
       "      <td>279.279220</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.107202</td>\n",
       "      <td>-0.091706</td>\n",
       "      <td>-0.112745</td>\n",
       "      <td>-0.111334</td>\n",
       "      <td>-0.087399</td>\n",
       "      <td>-0.101718</td>\n",
       "      <td>-0.139764</td>\n",
       "      <td>-0.165388</td>\n",
       "      <td>-0.152527</td>\n",
       "      <td>5993.838377</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>411324</td>\n",
       "      <td>290.225631</td>\n",
       "      <td>291.483012</td>\n",
       "      <td>284.924729</td>\n",
       "      <td>285.230136</td>\n",
       "      <td>283.776633</td>\n",
       "      <td>282.401835</td>\n",
       "      <td>278.885096</td>\n",
       "      <td>281.475366</td>\n",
       "      <td>278.285736</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.104642</td>\n",
       "      <td>-0.097879</td>\n",
       "      <td>-0.105863</td>\n",
       "      <td>-0.115831</td>\n",
       "      <td>-0.099522</td>\n",
       "      <td>-0.129985</td>\n",
       "      <td>-0.157257</td>\n",
       "      <td>-0.181493</td>\n",
       "      <td>-0.195202</td>\n",
       "      <td>5321.619139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>410122</td>\n",
       "      <td>290.547202</td>\n",
       "      <td>290.788948</td>\n",
       "      <td>284.754084</td>\n",
       "      <td>284.221446</td>\n",
       "      <td>283.644068</td>\n",
       "      <td>281.041844</td>\n",
       "      <td>277.892288</td>\n",
       "      <td>280.847721</td>\n",
       "      <td>277.055438</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.114016</td>\n",
       "      <td>-0.099527</td>\n",
       "      <td>-0.123841</td>\n",
       "      <td>-0.119494</td>\n",
       "      <td>-0.091247</td>\n",
       "      <td>-0.122924</td>\n",
       "      <td>-0.127055</td>\n",
       "      <td>-0.167357</td>\n",
       "      <td>-0.171446</td>\n",
       "      <td>5738.673461</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>102 rows × 1211 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       NAME  1007AvgSurfT_inst  1015AvgSurfT_inst  1023AvgSurfT_inst   \n",
       "0    410522         289.267970         289.607714         284.198419  \\\n",
       "1    410421         290.792832         291.749905         284.957157   \n",
       "2    411726         290.104474         291.369130         284.662735   \n",
       "3    410822         291.470376         291.976974         285.966020   \n",
       "4    411082         290.781240         291.381349         284.829544   \n",
       "..      ...                ...                ...                ...   \n",
       "97   411081         290.492117         291.137083         284.656203   \n",
       "98   411424         290.480466         291.144719         285.300452   \n",
       "99   411724         291.166128         291.765982         285.729775   \n",
       "100  411324         290.225631         291.483012         284.924729   \n",
       "101  410122         290.547202         290.788948         284.754084   \n",
       "\n",
       "     1031AvgSurfT_inst  1108AvgSurfT_inst  1116AvgSurfT_inst   \n",
       "0           282.499874         282.153628         278.815665  \\\n",
       "1           284.889942         283.633298         281.702103   \n",
       "2           284.599967         283.525928         282.031064   \n",
       "3           285.081208         284.030063         281.088398   \n",
       "4           284.482888         283.607316         281.315313   \n",
       "..                 ...                ...                ...   \n",
       "97          284.314321         283.230126         281.058892   \n",
       "98          284.801620         284.250235         282.018702   \n",
       "99          285.499801         284.553301         283.242707   \n",
       "100         285.230136         283.776633         282.401835   \n",
       "101         284.221446         283.644068         281.041844   \n",
       "\n",
       "     1124AvgSurfT_inst  1202AvgSurfT_inst  1210AvgSurfT_inst  ...   0330wet   \n",
       "0           276.589993         278.381273         275.111139  ... -0.128518  \\\n",
       "1           277.873141         281.077626         277.286874  ... -0.108769   \n",
       "2           278.567309         281.479865         278.213156  ... -0.122235   \n",
       "3           278.294676         280.440744         276.371585  ... -0.090432   \n",
       "4           277.356142         280.857730         277.138784  ... -0.104100   \n",
       "..                 ...                ...                ...  ...       ...   \n",
       "97          276.996953         280.644978         276.846233  ... -0.106409   \n",
       "98          278.046128         280.788775         277.985123  ... -0.119064   \n",
       "99          278.909748         281.838617         279.279220  ... -0.107202   \n",
       "100         278.885096         281.475366         278.285736  ... -0.104642   \n",
       "101         277.892288         280.847721         277.055438  ... -0.114016   \n",
       "\n",
       "      0407wet   0415wet   0423wet   0501wet   0509wet   0517wet   0525wet   \n",
       "0   -0.064188 -0.116760 -0.096134 -0.089233 -0.108190 -0.127928 -0.101819  \\\n",
       "1   -0.101318 -0.100954 -0.119105 -0.098386 -0.117942 -0.135547 -0.154707   \n",
       "2   -0.128738 -0.143569 -0.143309 -0.101453 -0.133007 -0.169093 -0.172815   \n",
       "3   -0.098571 -0.094352 -0.096503 -0.079822 -0.094260 -0.119584 -0.101219   \n",
       "4   -0.091168 -0.105842 -0.108215 -0.085076 -0.109715 -0.120607 -0.149887   \n",
       "..        ...       ...       ...       ...       ...       ...       ...   \n",
       "97  -0.100915 -0.108755 -0.112778 -0.096975 -0.121093 -0.146088 -0.145152   \n",
       "98  -0.090531 -0.102692 -0.095873 -0.081536 -0.103858 -0.139242 -0.170361   \n",
       "99  -0.091706 -0.112745 -0.111334 -0.087399 -0.101718 -0.139764 -0.165388   \n",
       "100 -0.097879 -0.105863 -0.115831 -0.099522 -0.129985 -0.157257 -0.181493   \n",
       "101 -0.099527 -0.123841 -0.119494 -0.091247 -0.122924 -0.127055 -0.167357   \n",
       "\n",
       "      0602wet    2016年小麦亩产  \n",
       "0   -0.146393  6293.602209  \n",
       "1   -0.182618  5445.018049  \n",
       "2   -0.175776  5700.138515  \n",
       "3   -0.148965  7960.532217  \n",
       "4   -0.185996  7515.676393  \n",
       "..        ...          ...  \n",
       "97  -0.188275  6179.400354  \n",
       "98  -0.168860  7380.460870  \n",
       "99  -0.152527  5993.838377  \n",
       "100 -0.195202  5321.619139  \n",
       "101 -0.171446  5738.673461  \n",
       "\n",
       "[102 rows x 1211 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_16"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "09b2550d-a4ce-44f0-b136-f7d449d2192f",
   "metadata": {},
   "source": [
    "####  sur_refl_b01, sur_refl_b02,sur_refl_b03,sur_refl_b04,sur_refl_b05,sur_refl_b06,sur_refl_b07只是用来修改异常值数据，不参与特征筛选，所以去掉"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "0efd5d7f-fb91-4640-9a72-01ca05593d61",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "df_16 = df_16.drop(df_16.columns[962:1179], axis=1)\n",
    "df_17=df_17.drop(df_17.columns[962:1179], axis=1)\n",
    "df_18=df_18.drop(df_18.columns[962:1179], axis=1)\n",
    "df_19=df_19.drop(df_19.columns[993:1217], axis=1)\n",
    "df_20=df_20.drop(df_20.columns[993:1217], axis=1)\n",
    "df_21=df_21.drop(df_21.columns[993:1217], axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "08f7ddf6-f35f-461d-a45f-4cd57625028b",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "for df in [df_16, df_17, df_18, df_19, df_20, df_21]: #删除空格列\n",
    "    df.drop(columns=df.columns[df.columns.str.contains('Unnamed')], inplace=True, errors='ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "9ee35a02-8457-4f10-9633-e86e6e1226ea",
   "metadata": {},
   "outputs": [],
   "source": [
    "columns=['AvgSurfT_inst','CanopInt_inst','DVI','ECanop_tavg','EVI','EVI2',\n",
    " 'EXG','GCVI','GI','GNDVI','LST_Day_1km','LST_Night_1km','Lai_500m','MCARI',\n",
    " 'MSR','NDGI','NDVI','NGBDI','OSAVI','RootMoist_inst','SR','SVAI',\n",
    " 'SoilMoi0_10cm_inst','SoilMoi10_40cm_inst','VDVI','WDRVI','WDVI','soil_temperature_level_1',\n",
    " 'soil_temperature_level_2','soil_temperature_level_3','soil_temperature_level_4','wet']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "e7a09c83-83aa-461f-a6e8-f83fa9562c15",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "32"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(columns)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "7b89e24b-7309-4b23-a919-9e51886dcd61",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>NAME</th>\n",
       "      <th>1008AvgSurfT_inst</th>\n",
       "      <th>1016AvgSurfT_inst</th>\n",
       "      <th>1024AvgSurfT_inst</th>\n",
       "      <th>1101AvgSurfT_inst</th>\n",
       "      <th>1109AvgSurfT_inst</th>\n",
       "      <th>1117AvgSurfT_inst</th>\n",
       "      <th>1125AvgSurfT_inst</th>\n",
       "      <th>1203AvgSurfT_inst</th>\n",
       "      <th>1211AvgSurfT_inst</th>\n",
       "      <th>...</th>\n",
       "      <th>0407wet</th>\n",
       "      <th>0415wet</th>\n",
       "      <th>0423wet</th>\n",
       "      <th>0501wet</th>\n",
       "      <th>0509wet</th>\n",
       "      <th>0517wet</th>\n",
       "      <th>0525wet</th>\n",
       "      <th>0602wet</th>\n",
       "      <th>0610wet</th>\n",
       "      <th>2021年小麦亩产</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>410522</td>\n",
       "      <td>288.157658</td>\n",
       "      <td>283.846571</td>\n",
       "      <td>287.100537</td>\n",
       "      <td>284.461634</td>\n",
       "      <td>281.202441</td>\n",
       "      <td>280.042889</td>\n",
       "      <td>278.588478</td>\n",
       "      <td>278.457223</td>\n",
       "      <td>276.628016</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.111602</td>\n",
       "      <td>-0.114125</td>\n",
       "      <td>-0.090609</td>\n",
       "      <td>-0.088870</td>\n",
       "      <td>-0.094664</td>\n",
       "      <td>-0.095697</td>\n",
       "      <td>-0.101653</td>\n",
       "      <td>-0.125187</td>\n",
       "      <td>-0.207988</td>\n",
       "      <td>7467.000138</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>410421</td>\n",
       "      <td>288.271673</td>\n",
       "      <td>285.439171</td>\n",
       "      <td>288.417221</td>\n",
       "      <td>285.653959</td>\n",
       "      <td>283.808334</td>\n",
       "      <td>282.757982</td>\n",
       "      <td>280.805776</td>\n",
       "      <td>281.127841</td>\n",
       "      <td>279.090633</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.113114</td>\n",
       "      <td>-0.099330</td>\n",
       "      <td>-0.088144</td>\n",
       "      <td>-0.115855</td>\n",
       "      <td>-0.105368</td>\n",
       "      <td>-0.127577</td>\n",
       "      <td>-0.180754</td>\n",
       "      <td>-0.183730</td>\n",
       "      <td>-0.226177</td>\n",
       "      <td>5972.666001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>411726</td>\n",
       "      <td>288.104161</td>\n",
       "      <td>285.026365</td>\n",
       "      <td>288.366736</td>\n",
       "      <td>285.992318</td>\n",
       "      <td>283.303795</td>\n",
       "      <td>282.510739</td>\n",
       "      <td>280.645679</td>\n",
       "      <td>281.325692</td>\n",
       "      <td>279.533836</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.133379</td>\n",
       "      <td>-0.119200</td>\n",
       "      <td>-0.107184</td>\n",
       "      <td>-0.134329</td>\n",
       "      <td>-0.094007</td>\n",
       "      <td>-0.170702</td>\n",
       "      <td>-0.192097</td>\n",
       "      <td>-0.206623</td>\n",
       "      <td>-0.223434</td>\n",
       "      <td>5687.791498</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>410822</td>\n",
       "      <td>288.597088</td>\n",
       "      <td>285.141158</td>\n",
       "      <td>288.282857</td>\n",
       "      <td>285.239235</td>\n",
       "      <td>282.577952</td>\n",
       "      <td>281.641586</td>\n",
       "      <td>279.942304</td>\n",
       "      <td>279.700389</td>\n",
       "      <td>277.935953</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.098178</td>\n",
       "      <td>-0.095190</td>\n",
       "      <td>-0.062063</td>\n",
       "      <td>-0.102733</td>\n",
       "      <td>-0.097822</td>\n",
       "      <td>-0.109270</td>\n",
       "      <td>-0.102655</td>\n",
       "      <td>-0.148855</td>\n",
       "      <td>-0.217451</td>\n",
       "      <td>7959.597222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>411082</td>\n",
       "      <td>288.977793</td>\n",
       "      <td>285.862932</td>\n",
       "      <td>288.868240</td>\n",
       "      <td>286.280606</td>\n",
       "      <td>283.437523</td>\n",
       "      <td>282.661409</td>\n",
       "      <td>280.483339</td>\n",
       "      <td>281.049394</td>\n",
       "      <td>278.924852</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.104227</td>\n",
       "      <td>-0.086986</td>\n",
       "      <td>-0.074036</td>\n",
       "      <td>-0.102874</td>\n",
       "      <td>-0.098649</td>\n",
       "      <td>-0.111981</td>\n",
       "      <td>-0.128237</td>\n",
       "      <td>-0.188735</td>\n",
       "      <td>-0.222619</td>\n",
       "      <td>7662.496889</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>411081</td>\n",
       "      <td>288.784533</td>\n",
       "      <td>285.576769</td>\n",
       "      <td>288.512812</td>\n",
       "      <td>285.867040</td>\n",
       "      <td>283.676015</td>\n",
       "      <td>282.620719</td>\n",
       "      <td>280.563217</td>\n",
       "      <td>281.027945</td>\n",
       "      <td>278.924877</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.113705</td>\n",
       "      <td>-0.101433</td>\n",
       "      <td>-0.090942</td>\n",
       "      <td>-0.119130</td>\n",
       "      <td>-0.104558</td>\n",
       "      <td>-0.127900</td>\n",
       "      <td>-0.151595</td>\n",
       "      <td>-0.185640</td>\n",
       "      <td>-0.220282</td>\n",
       "      <td>6613.422500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>411424</td>\n",
       "      <td>289.558513</td>\n",
       "      <td>286.008645</td>\n",
       "      <td>289.436974</td>\n",
       "      <td>286.220160</td>\n",
       "      <td>283.318745</td>\n",
       "      <td>282.717982</td>\n",
       "      <td>280.735908</td>\n",
       "      <td>281.309627</td>\n",
       "      <td>279.241800</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.098273</td>\n",
       "      <td>-0.083847</td>\n",
       "      <td>-0.074186</td>\n",
       "      <td>-0.109622</td>\n",
       "      <td>-0.090490</td>\n",
       "      <td>-0.111490</td>\n",
       "      <td>-0.138621</td>\n",
       "      <td>-0.242089</td>\n",
       "      <td>-0.237867</td>\n",
       "      <td>7579.469809</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>411724</td>\n",
       "      <td>289.985888</td>\n",
       "      <td>286.018838</td>\n",
       "      <td>290.018455</td>\n",
       "      <td>287.263036</td>\n",
       "      <td>284.772251</td>\n",
       "      <td>283.649509</td>\n",
       "      <td>281.640233</td>\n",
       "      <td>282.684478</td>\n",
       "      <td>280.568237</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.084108</td>\n",
       "      <td>-0.076640</td>\n",
       "      <td>-0.079914</td>\n",
       "      <td>-0.105175</td>\n",
       "      <td>-0.050227</td>\n",
       "      <td>-0.125142</td>\n",
       "      <td>-0.148281</td>\n",
       "      <td>-0.212428</td>\n",
       "      <td>-0.214618</td>\n",
       "      <td>5754.140236</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>411324</td>\n",
       "      <td>288.985695</td>\n",
       "      <td>285.359887</td>\n",
       "      <td>288.403580</td>\n",
       "      <td>286.457255</td>\n",
       "      <td>283.843044</td>\n",
       "      <td>283.562656</td>\n",
       "      <td>281.485315</td>\n",
       "      <td>281.708619</td>\n",
       "      <td>280.270829</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.104355</td>\n",
       "      <td>-0.114538</td>\n",
       "      <td>-0.097445</td>\n",
       "      <td>-0.122779</td>\n",
       "      <td>-0.082867</td>\n",
       "      <td>-0.136509</td>\n",
       "      <td>-0.192644</td>\n",
       "      <td>-0.200548</td>\n",
       "      <td>-0.237419</td>\n",
       "      <td>5467.128359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>410122</td>\n",
       "      <td>288.456659</td>\n",
       "      <td>285.170322</td>\n",
       "      <td>288.391462</td>\n",
       "      <td>285.616212</td>\n",
       "      <td>283.040188</td>\n",
       "      <td>282.052220</td>\n",
       "      <td>280.358141</td>\n",
       "      <td>280.584350</td>\n",
       "      <td>278.319013</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.116608</td>\n",
       "      <td>-0.103619</td>\n",
       "      <td>-0.095178</td>\n",
       "      <td>-0.119558</td>\n",
       "      <td>-0.117593</td>\n",
       "      <td>-0.132748</td>\n",
       "      <td>-0.131763</td>\n",
       "      <td>-0.163903</td>\n",
       "      <td>-0.186827</td>\n",
       "      <td>6637.200003</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>102 rows × 1026 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       NAME  1008AvgSurfT_inst  1016AvgSurfT_inst  1024AvgSurfT_inst   \n",
       "0    410522         288.157658         283.846571         287.100537  \\\n",
       "1    410421         288.271673         285.439171         288.417221   \n",
       "2    411726         288.104161         285.026365         288.366736   \n",
       "3    410822         288.597088         285.141158         288.282857   \n",
       "4    411082         288.977793         285.862932         288.868240   \n",
       "..      ...                ...                ...                ...   \n",
       "97   411081         288.784533         285.576769         288.512812   \n",
       "98   411424         289.558513         286.008645         289.436974   \n",
       "99   411724         289.985888         286.018838         290.018455   \n",
       "100  411324         288.985695         285.359887         288.403580   \n",
       "101  410122         288.456659         285.170322         288.391462   \n",
       "\n",
       "     1101AvgSurfT_inst  1109AvgSurfT_inst  1117AvgSurfT_inst   \n",
       "0           284.461634         281.202441         280.042889  \\\n",
       "1           285.653959         283.808334         282.757982   \n",
       "2           285.992318         283.303795         282.510739   \n",
       "3           285.239235         282.577952         281.641586   \n",
       "4           286.280606         283.437523         282.661409   \n",
       "..                 ...                ...                ...   \n",
       "97          285.867040         283.676015         282.620719   \n",
       "98          286.220160         283.318745         282.717982   \n",
       "99          287.263036         284.772251         283.649509   \n",
       "100         286.457255         283.843044         283.562656   \n",
       "101         285.616212         283.040188         282.052220   \n",
       "\n",
       "     1125AvgSurfT_inst  1203AvgSurfT_inst  1211AvgSurfT_inst  ...   0407wet   \n",
       "0           278.588478         278.457223         276.628016  ... -0.111602  \\\n",
       "1           280.805776         281.127841         279.090633  ... -0.113114   \n",
       "2           280.645679         281.325692         279.533836  ... -0.133379   \n",
       "3           279.942304         279.700389         277.935953  ... -0.098178   \n",
       "4           280.483339         281.049394         278.924852  ... -0.104227   \n",
       "..                 ...                ...                ...  ...       ...   \n",
       "97          280.563217         281.027945         278.924877  ... -0.113705   \n",
       "98          280.735908         281.309627         279.241800  ... -0.098273   \n",
       "99          281.640233         282.684478         280.568237  ... -0.084108   \n",
       "100         281.485315         281.708619         280.270829  ... -0.104355   \n",
       "101         280.358141         280.584350         278.319013  ... -0.116608   \n",
       "\n",
       "      0415wet   0423wet   0501wet   0509wet   0517wet   0525wet   0602wet   \n",
       "0   -0.114125 -0.090609 -0.088870 -0.094664 -0.095697 -0.101653 -0.125187  \\\n",
       "1   -0.099330 -0.088144 -0.115855 -0.105368 -0.127577 -0.180754 -0.183730   \n",
       "2   -0.119200 -0.107184 -0.134329 -0.094007 -0.170702 -0.192097 -0.206623   \n",
       "3   -0.095190 -0.062063 -0.102733 -0.097822 -0.109270 -0.102655 -0.148855   \n",
       "4   -0.086986 -0.074036 -0.102874 -0.098649 -0.111981 -0.128237 -0.188735   \n",
       "..        ...       ...       ...       ...       ...       ...       ...   \n",
       "97  -0.101433 -0.090942 -0.119130 -0.104558 -0.127900 -0.151595 -0.185640   \n",
       "98  -0.083847 -0.074186 -0.109622 -0.090490 -0.111490 -0.138621 -0.242089   \n",
       "99  -0.076640 -0.079914 -0.105175 -0.050227 -0.125142 -0.148281 -0.212428   \n",
       "100 -0.114538 -0.097445 -0.122779 -0.082867 -0.136509 -0.192644 -0.200548   \n",
       "101 -0.103619 -0.095178 -0.119558 -0.117593 -0.132748 -0.131763 -0.163903   \n",
       "\n",
       "      0610wet    2021年小麦亩产  \n",
       "0   -0.207988  7467.000138  \n",
       "1   -0.226177  5972.666001  \n",
       "2   -0.223434  5687.791498  \n",
       "3   -0.217451  7959.597222  \n",
       "4   -0.222619  7662.496889  \n",
       "..        ...          ...  \n",
       "97  -0.220282  6613.422500  \n",
       "98  -0.237867  7579.469809  \n",
       "99  -0.214618  5754.140236  \n",
       "100 -0.237419  5467.128359  \n",
       "101 -0.186827  6637.200003  \n",
       "\n",
       "[102 rows x 1026 columns]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_21\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "465754af-ab86-4b1a-82e6-263c28c6bbbe",
   "metadata": {},
   "source": [
    "### 2016"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "0e913eea-04c4-4b74-88c0-5f43909ba829",
   "metadata": {},
   "outputs": [],
   "source": [
    "period_16 = pd.DataFrame()\n",
    "period_16['NAME']=df_16['NAME']\n",
    "for i in range(32):\n",
    "    period_16[columns[i]+'_'+'bozhong']=(df_16.iloc[:,1+31*i+0]+df_16.iloc[:,1+31*i+1])/2\n",
    "    period_16[columns[i]+'_'+'chumiao']=(df_16.iloc[:,1+31*i+1]+df_16.iloc[:,1+31*i+2]+df_16.iloc[:,1+31*i+3])/3\n",
    "    period_16[columns[i]+'_'+'fennie']=(df_16.iloc[:,1+31*i+4]+df_16.iloc[:,1+31*i+5]+df_16.iloc[:,1+31*i+6]\n",
    "                                   +df_16.iloc[:,1+31*i+7]+df_16.iloc[:,1+31*i+8]+df_16.iloc[:,1+31*i+9])/6\n",
    "    period_16[columns[i]+'_'+'yuedong']=(df_16.iloc[:,1+31*i+10]+df_16.iloc[:,1+31*i+11]+df_16.iloc[:,1+31*i+12]\n",
    "                                    +df_16.iloc[:,1+31*i+13]+df_16.iloc[:,1+31*i+14])/5\n",
    "    period_16[columns[i]+'_'+'fanqing']=(df_16.iloc[:,1+31*i+15]+df_16.iloc[:,1+31*i+16]+df_16.iloc[:,1+31*i+17]\n",
    "                                    +df_16.iloc[:,1+31*i+18])/4\n",
    "    period_16[columns[i]+'_'+'bajie']=(df_16.iloc[:,1+31*i+19]+df_16.iloc[:,1+31*i+20]+df_16.iloc[:,1+31*i+21]\n",
    "                                    +df_16.iloc[:,1+31*i+22])/4\n",
    "    period_16[columns[i]+'_'+'yunsui']=df_16.iloc[:,1+31*i+23]\n",
    "    period_16[columns[i]+'_'+'chousui']=df_16.iloc[:,1+31*i+24]\n",
    "    period_16[columns[i]+'_'+'kaihua']=df_16.iloc[:,1+31*i+25]\n",
    "    period_16[columns[i]+'_'+'guanjiang']=(df_16.iloc[:,1+31*i+26]+df_16.iloc[:,1+31*i+27]+df_16.iloc[:,1+31*i+28]\n",
    "                                +df_16.iloc[:,1+31*i+29])/4\n",
    "    period_16[columns[i]+'_'+'chengshu']=(df_16.iloc[:,1+31*i+29]+df_16.iloc[:,1+31*i+30])/2\n",
    "    period_16[columns[i]+'_'+'shouhuo']=df_16.iloc[:,1+31*i+30]\n",
    "period_16['亩产']=df_16['2016年小麦亩产']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "271cc956-9516-4f7f-af25-7629de8d47d2",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>NAME</th>\n",
       "      <th>AvgSurfT_inst_bozhong</th>\n",
       "      <th>AvgSurfT_inst_chumiao</th>\n",
       "      <th>AvgSurfT_inst_fennie</th>\n",
       "      <th>AvgSurfT_inst_yuedong</th>\n",
       "      <th>AvgSurfT_inst_fanqing</th>\n",
       "      <th>AvgSurfT_inst_bajie</th>\n",
       "      <th>AvgSurfT_inst_yunsui</th>\n",
       "      <th>AvgSurfT_inst_chousui</th>\n",
       "      <th>AvgSurfT_inst_kaihua</th>\n",
       "      <th>...</th>\n",
       "      <th>wet_yuedong</th>\n",
       "      <th>wet_fanqing</th>\n",
       "      <th>wet_bajie</th>\n",
       "      <th>wet_yunsui</th>\n",
       "      <th>wet_chousui</th>\n",
       "      <th>wet_kaihua</th>\n",
       "      <th>wet_guanjiang</th>\n",
       "      <th>wet_chengshu</th>\n",
       "      <th>wet_shouhuo</th>\n",
       "      <th>亩产</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>410522</td>\n",
       "      <td>289.437842</td>\n",
       "      <td>285.435336</td>\n",
       "      <td>277.698303</td>\n",
       "      <td>273.649656</td>\n",
       "      <td>278.578545</td>\n",
       "      <td>284.211636</td>\n",
       "      <td>287.515100</td>\n",
       "      <td>291.079489</td>\n",
       "      <td>293.184371</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.102058</td>\n",
       "      <td>-0.124381</td>\n",
       "      <td>-0.117495</td>\n",
       "      <td>-0.064188</td>\n",
       "      <td>-0.116760</td>\n",
       "      <td>-0.096134</td>\n",
       "      <td>-0.106793</td>\n",
       "      <td>-0.124106</td>\n",
       "      <td>-0.146393</td>\n",
       "      <td>6293.602209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>410421</td>\n",
       "      <td>291.271368</td>\n",
       "      <td>287.199001</td>\n",
       "      <td>280.024116</td>\n",
       "      <td>276.070788</td>\n",
       "      <td>279.993156</td>\n",
       "      <td>284.663927</td>\n",
       "      <td>288.637975</td>\n",
       "      <td>292.425981</td>\n",
       "      <td>293.919371</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.120498</td>\n",
       "      <td>-0.121210</td>\n",
       "      <td>-0.114295</td>\n",
       "      <td>-0.101318</td>\n",
       "      <td>-0.100954</td>\n",
       "      <td>-0.119105</td>\n",
       "      <td>-0.126645</td>\n",
       "      <td>-0.168663</td>\n",
       "      <td>-0.182618</td>\n",
       "      <td>5445.018049</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>411726</td>\n",
       "      <td>290.736802</td>\n",
       "      <td>286.877277</td>\n",
       "      <td>280.447976</td>\n",
       "      <td>276.867486</td>\n",
       "      <td>279.909462</td>\n",
       "      <td>284.437641</td>\n",
       "      <td>287.007934</td>\n",
       "      <td>290.922926</td>\n",
       "      <td>291.900687</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.128630</td>\n",
       "      <td>-0.118998</td>\n",
       "      <td>-0.131927</td>\n",
       "      <td>-0.128738</td>\n",
       "      <td>-0.143569</td>\n",
       "      <td>-0.143309</td>\n",
       "      <td>-0.144092</td>\n",
       "      <td>-0.174296</td>\n",
       "      <td>-0.175776</td>\n",
       "      <td>5700.138515</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>410822</td>\n",
       "      <td>291.723675</td>\n",
       "      <td>287.674734</td>\n",
       "      <td>279.601935</td>\n",
       "      <td>275.753404</td>\n",
       "      <td>280.026118</td>\n",
       "      <td>285.447371</td>\n",
       "      <td>289.812248</td>\n",
       "      <td>293.156150</td>\n",
       "      <td>294.311578</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.105485</td>\n",
       "      <td>-0.089615</td>\n",
       "      <td>-0.098371</td>\n",
       "      <td>-0.098571</td>\n",
       "      <td>-0.094352</td>\n",
       "      <td>-0.096503</td>\n",
       "      <td>-0.098721</td>\n",
       "      <td>-0.125092</td>\n",
       "      <td>-0.148965</td>\n",
       "      <td>7960.532217</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>411082</td>\n",
       "      <td>291.081294</td>\n",
       "      <td>286.897927</td>\n",
       "      <td>279.709342</td>\n",
       "      <td>275.877200</td>\n",
       "      <td>279.760035</td>\n",
       "      <td>284.325707</td>\n",
       "      <td>288.217006</td>\n",
       "      <td>291.887455</td>\n",
       "      <td>293.554419</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.110543</td>\n",
       "      <td>-0.118228</td>\n",
       "      <td>-0.113543</td>\n",
       "      <td>-0.091168</td>\n",
       "      <td>-0.105842</td>\n",
       "      <td>-0.108215</td>\n",
       "      <td>-0.116321</td>\n",
       "      <td>-0.167942</td>\n",
       "      <td>-0.185996</td>\n",
       "      <td>7515.676393</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>411081</td>\n",
       "      <td>290.814600</td>\n",
       "      <td>286.702536</td>\n",
       "      <td>279.449822</td>\n",
       "      <td>275.709382</td>\n",
       "      <td>279.634063</td>\n",
       "      <td>284.124320</td>\n",
       "      <td>288.319887</td>\n",
       "      <td>292.000703</td>\n",
       "      <td>293.526261</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.107581</td>\n",
       "      <td>-0.119109</td>\n",
       "      <td>-0.115847</td>\n",
       "      <td>-0.100915</td>\n",
       "      <td>-0.108755</td>\n",
       "      <td>-0.112778</td>\n",
       "      <td>-0.127327</td>\n",
       "      <td>-0.166713</td>\n",
       "      <td>-0.188275</td>\n",
       "      <td>6179.400354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>411424</td>\n",
       "      <td>290.812592</td>\n",
       "      <td>287.082264</td>\n",
       "      <td>280.246718</td>\n",
       "      <td>276.168882</td>\n",
       "      <td>279.496484</td>\n",
       "      <td>284.288082</td>\n",
       "      <td>287.712756</td>\n",
       "      <td>291.578805</td>\n",
       "      <td>292.771985</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.118954</td>\n",
       "      <td>-0.128412</td>\n",
       "      <td>-0.127894</td>\n",
       "      <td>-0.090531</td>\n",
       "      <td>-0.102692</td>\n",
       "      <td>-0.095873</td>\n",
       "      <td>-0.123749</td>\n",
       "      <td>-0.169610</td>\n",
       "      <td>-0.168860</td>\n",
       "      <td>7380.460870</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>411724</td>\n",
       "      <td>291.466055</td>\n",
       "      <td>287.665186</td>\n",
       "      <td>281.240534</td>\n",
       "      <td>277.309931</td>\n",
       "      <td>280.183213</td>\n",
       "      <td>284.754987</td>\n",
       "      <td>287.353646</td>\n",
       "      <td>291.546309</td>\n",
       "      <td>292.471102</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.120101</td>\n",
       "      <td>-0.117149</td>\n",
       "      <td>-0.119831</td>\n",
       "      <td>-0.091706</td>\n",
       "      <td>-0.112745</td>\n",
       "      <td>-0.111334</td>\n",
       "      <td>-0.123567</td>\n",
       "      <td>-0.158957</td>\n",
       "      <td>-0.152527</td>\n",
       "      <td>5993.838377</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>411324</td>\n",
       "      <td>290.854321</td>\n",
       "      <td>287.212626</td>\n",
       "      <td>280.678779</td>\n",
       "      <td>277.247600</td>\n",
       "      <td>279.922049</td>\n",
       "      <td>283.964577</td>\n",
       "      <td>287.110556</td>\n",
       "      <td>290.182641</td>\n",
       "      <td>291.374045</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.117350</td>\n",
       "      <td>-0.117184</td>\n",
       "      <td>-0.120024</td>\n",
       "      <td>-0.097879</td>\n",
       "      <td>-0.105863</td>\n",
       "      <td>-0.115831</td>\n",
       "      <td>-0.142064</td>\n",
       "      <td>-0.188347</td>\n",
       "      <td>-0.195202</td>\n",
       "      <td>5321.619139</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>410122</td>\n",
       "      <td>290.668075</td>\n",
       "      <td>286.588159</td>\n",
       "      <td>279.620002</td>\n",
       "      <td>275.617019</td>\n",
       "      <td>279.930824</td>\n",
       "      <td>284.591038</td>\n",
       "      <td>288.409642</td>\n",
       "      <td>291.990617</td>\n",
       "      <td>293.894322</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.121054</td>\n",
       "      <td>-0.131227</td>\n",
       "      <td>-0.125651</td>\n",
       "      <td>-0.099527</td>\n",
       "      <td>-0.123841</td>\n",
       "      <td>-0.119494</td>\n",
       "      <td>-0.127146</td>\n",
       "      <td>-0.169401</td>\n",
       "      <td>-0.171446</td>\n",
       "      <td>5738.673461</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>102 rows × 386 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       NAME  AvgSurfT_inst_bozhong  AvgSurfT_inst_chumiao   \n",
       "0    410522             289.437842             285.435336  \\\n",
       "1    410421             291.271368             287.199001   \n",
       "2    411726             290.736802             286.877277   \n",
       "3    410822             291.723675             287.674734   \n",
       "4    411082             291.081294             286.897927   \n",
       "..      ...                    ...                    ...   \n",
       "97   411081             290.814600             286.702536   \n",
       "98   411424             290.812592             287.082264   \n",
       "99   411724             291.466055             287.665186   \n",
       "100  411324             290.854321             287.212626   \n",
       "101  410122             290.668075             286.588159   \n",
       "\n",
       "     AvgSurfT_inst_fennie  AvgSurfT_inst_yuedong  AvgSurfT_inst_fanqing   \n",
       "0              277.698303             273.649656             278.578545  \\\n",
       "1              280.024116             276.070788             279.993156   \n",
       "2              280.447976             276.867486             279.909462   \n",
       "3              279.601935             275.753404             280.026118   \n",
       "4              279.709342             275.877200             279.760035   \n",
       "..                    ...                    ...                    ...   \n",
       "97             279.449822             275.709382             279.634063   \n",
       "98             280.246718             276.168882             279.496484   \n",
       "99             281.240534             277.309931             280.183213   \n",
       "100            280.678779             277.247600             279.922049   \n",
       "101            279.620002             275.617019             279.930824   \n",
       "\n",
       "     AvgSurfT_inst_bajie  AvgSurfT_inst_yunsui  AvgSurfT_inst_chousui   \n",
       "0             284.211636            287.515100             291.079489  \\\n",
       "1             284.663927            288.637975             292.425981   \n",
       "2             284.437641            287.007934             290.922926   \n",
       "3             285.447371            289.812248             293.156150   \n",
       "4             284.325707            288.217006             291.887455   \n",
       "..                   ...                   ...                    ...   \n",
       "97            284.124320            288.319887             292.000703   \n",
       "98            284.288082            287.712756             291.578805   \n",
       "99            284.754987            287.353646             291.546309   \n",
       "100           283.964577            287.110556             290.182641   \n",
       "101           284.591038            288.409642             291.990617   \n",
       "\n",
       "     AvgSurfT_inst_kaihua  ...  wet_yuedong  wet_fanqing  wet_bajie   \n",
       "0              293.184371  ...    -0.102058    -0.124381  -0.117495  \\\n",
       "1              293.919371  ...    -0.120498    -0.121210  -0.114295   \n",
       "2              291.900687  ...    -0.128630    -0.118998  -0.131927   \n",
       "3              294.311578  ...    -0.105485    -0.089615  -0.098371   \n",
       "4              293.554419  ...    -0.110543    -0.118228  -0.113543   \n",
       "..                    ...  ...          ...          ...        ...   \n",
       "97             293.526261  ...    -0.107581    -0.119109  -0.115847   \n",
       "98             292.771985  ...    -0.118954    -0.128412  -0.127894   \n",
       "99             292.471102  ...    -0.120101    -0.117149  -0.119831   \n",
       "100            291.374045  ...    -0.117350    -0.117184  -0.120024   \n",
       "101            293.894322  ...    -0.121054    -0.131227  -0.125651   \n",
       "\n",
       "     wet_yunsui  wet_chousui  wet_kaihua  wet_guanjiang  wet_chengshu   \n",
       "0     -0.064188    -0.116760   -0.096134      -0.106793     -0.124106  \\\n",
       "1     -0.101318    -0.100954   -0.119105      -0.126645     -0.168663   \n",
       "2     -0.128738    -0.143569   -0.143309      -0.144092     -0.174296   \n",
       "3     -0.098571    -0.094352   -0.096503      -0.098721     -0.125092   \n",
       "4     -0.091168    -0.105842   -0.108215      -0.116321     -0.167942   \n",
       "..          ...          ...         ...            ...           ...   \n",
       "97    -0.100915    -0.108755   -0.112778      -0.127327     -0.166713   \n",
       "98    -0.090531    -0.102692   -0.095873      -0.123749     -0.169610   \n",
       "99    -0.091706    -0.112745   -0.111334      -0.123567     -0.158957   \n",
       "100   -0.097879    -0.105863   -0.115831      -0.142064     -0.188347   \n",
       "101   -0.099527    -0.123841   -0.119494      -0.127146     -0.169401   \n",
       "\n",
       "     wet_shouhuo           亩产  \n",
       "0      -0.146393  6293.602209  \n",
       "1      -0.182618  5445.018049  \n",
       "2      -0.175776  5700.138515  \n",
       "3      -0.148965  7960.532217  \n",
       "4      -0.185996  7515.676393  \n",
       "..           ...          ...  \n",
       "97     -0.188275  6179.400354  \n",
       "98     -0.168860  7380.460870  \n",
       "99     -0.152527  5993.838377  \n",
       "100    -0.195202  5321.619139  \n",
       "101    -0.171446  5738.673461  \n",
       "\n",
       "[102 rows x 386 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "period_16"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7d3d6050-3469-4b34-a737-207623b3a774",
   "metadata": {},
   "source": [
    "### 2017"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "2c824a8b-6add-41f6-a6bf-3e797433319b",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "period_17 = pd.DataFrame()\n",
    "period_17['NAME']=df_17['NAME']\n",
    "for i in range(32):\n",
    "    period_17[columns[i]+'_'+'bozhong']=(df_17.iloc[:,1+31*i+0]+df_17.iloc[:,1+31*i+1])/2\n",
    "    period_17[columns[i]+'_'+'chumiao']=(df_17.iloc[:,1+31*i+1]+df_17.iloc[:,1+31*i+2]+df_17.iloc[:,1+31*i+3])/3\n",
    "    period_17[columns[i]+'_'+'fennie']=(df_17.iloc[:,1+31*i+3]+df_17.iloc[:,1+31*i+4]+df_17.iloc[:,1+31*i+5]+df_17.iloc[:,1+31*i+6]\n",
    "                                   +df_17.iloc[:,1+31*i+7]+df_17.iloc[:,1+31*i+8]+df_17.iloc[:,1+31*i+9])/7\n",
    "    period_17[columns[i]+'_'+'yuedong']=(df_17.iloc[:,1+31*i+10]+df_17.iloc[:,1+31*i+11]+df_17.iloc[:,1+31*i+12]\n",
    "                                    +df_17.iloc[:,1+31*i+13]+df_17.iloc[:,1+31*i+14])/5\n",
    "    period_17[columns[i]+'_'+'fanqing']=(df_17.iloc[:,1+31*i+15]+df_17.iloc[:,1+31*i+16]+df_17.iloc[:,1+31*i+17]\n",
    "                                    +df_17.iloc[:,1+31*i+18])/4\n",
    "    period_17[columns[i]+'_'+'bajie']=(df_17.iloc[:,1+31*i+19]+df_17.iloc[:,1+31*i+20]+df_17.iloc[:,1+31*i+21]\n",
    "                                    +df_17.iloc[:,1+31*i+22])/4\n",
    "    period_17[columns[i]+'_'+'yunsui']=df_17.iloc[:,1+31*i+23]\n",
    "    period_17[columns[i]+'_'+'chousui']=df_17.iloc[:,1+31*i+24]\n",
    "    period_17[columns[i]+'_'+'kaihua']=df_17.iloc[:,1+31*i+25]\n",
    "    period_17[columns[i]+'_'+'guanjiang']=(df_17.iloc[:,1+31*i+26]+df_17.iloc[:,1+31*i+27]+df_17.iloc[:,1+31*i+28]\n",
    "                                +df_17.iloc[:,1+31*i+29])/4\n",
    "    period_17[columns[i]+'_'+'chengshu']=(df_17.iloc[:,1+31*i+29]+df_17.iloc[:,1+31*i+30])/2\n",
    "    period_17[columns[i]+'_'+'shouhuo']=df_17.iloc[:,1+31*i+30]\n",
    "period_17['亩产']=df_17['2017年小麦亩产']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "61566dfb-d201-4c1c-b080-df080b216cf1",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>NAME</th>\n",
       "      <th>AvgSurfT_inst_bozhong</th>\n",
       "      <th>AvgSurfT_inst_chumiao</th>\n",
       "      <th>AvgSurfT_inst_fennie</th>\n",
       "      <th>AvgSurfT_inst_yuedong</th>\n",
       "      <th>AvgSurfT_inst_fanqing</th>\n",
       "      <th>AvgSurfT_inst_bajie</th>\n",
       "      <th>AvgSurfT_inst_yunsui</th>\n",
       "      <th>AvgSurfT_inst_chousui</th>\n",
       "      <th>AvgSurfT_inst_kaihua</th>\n",
       "      <th>...</th>\n",
       "      <th>wet_yuedong</th>\n",
       "      <th>wet_fanqing</th>\n",
       "      <th>wet_bajie</th>\n",
       "      <th>wet_yunsui</th>\n",
       "      <th>wet_chousui</th>\n",
       "      <th>wet_kaihua</th>\n",
       "      <th>wet_guanjiang</th>\n",
       "      <th>wet_chengshu</th>\n",
       "      <th>wet_shouhuo</th>\n",
       "      <th>亩产</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>410522</td>\n",
       "      <td>288.415883</td>\n",
       "      <td>287.889611</td>\n",
       "      <td>278.046775</td>\n",
       "      <td>272.466666</td>\n",
       "      <td>277.901222</td>\n",
       "      <td>286.439935</td>\n",
       "      <td>289.705779</td>\n",
       "      <td>292.472507</td>\n",
       "      <td>294.452793</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.117180</td>\n",
       "      <td>-0.068961</td>\n",
       "      <td>-0.131784</td>\n",
       "      <td>-0.119223</td>\n",
       "      <td>-0.066014</td>\n",
       "      <td>-0.089520</td>\n",
       "      <td>-0.112424</td>\n",
       "      <td>-0.192579</td>\n",
       "      <td>-0.203809</td>\n",
       "      <td>7113.698630</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>410421</td>\n",
       "      <td>288.942562</td>\n",
       "      <td>288.839537</td>\n",
       "      <td>281.306733</td>\n",
       "      <td>273.917084</td>\n",
       "      <td>279.219194</td>\n",
       "      <td>286.771180</td>\n",
       "      <td>289.666784</td>\n",
       "      <td>292.250572</td>\n",
       "      <td>294.666358</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.136607</td>\n",
       "      <td>-0.066107</td>\n",
       "      <td>-0.128526</td>\n",
       "      <td>-0.126215</td>\n",
       "      <td>-0.064668</td>\n",
       "      <td>-0.098119</td>\n",
       "      <td>-0.109716</td>\n",
       "      <td>-0.220763</td>\n",
       "      <td>-0.244596</td>\n",
       "      <td>5645.657187</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>411726</td>\n",
       "      <td>288.294812</td>\n",
       "      <td>287.940112</td>\n",
       "      <td>281.469932</td>\n",
       "      <td>273.586388</td>\n",
       "      <td>278.770570</td>\n",
       "      <td>286.194890</td>\n",
       "      <td>288.324036</td>\n",
       "      <td>291.735998</td>\n",
       "      <td>293.058088</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.124971</td>\n",
       "      <td>-0.054457</td>\n",
       "      <td>-0.140474</td>\n",
       "      <td>-0.134938</td>\n",
       "      <td>-0.071561</td>\n",
       "      <td>-0.128855</td>\n",
       "      <td>-0.122227</td>\n",
       "      <td>-0.238291</td>\n",
       "      <td>-0.278113</td>\n",
       "      <td>5905.730129</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>410822</td>\n",
       "      <td>289.693244</td>\n",
       "      <td>289.603622</td>\n",
       "      <td>280.617863</td>\n",
       "      <td>273.919568</td>\n",
       "      <td>279.698123</td>\n",
       "      <td>287.864010</td>\n",
       "      <td>290.280989</td>\n",
       "      <td>293.956633</td>\n",
       "      <td>295.778920</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.110651</td>\n",
       "      <td>-0.069379</td>\n",
       "      <td>-0.113863</td>\n",
       "      <td>-0.122631</td>\n",
       "      <td>-0.066292</td>\n",
       "      <td>-0.081511</td>\n",
       "      <td>-0.106181</td>\n",
       "      <td>-0.216895</td>\n",
       "      <td>-0.252480</td>\n",
       "      <td>7997.010463</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>411082</td>\n",
       "      <td>288.772636</td>\n",
       "      <td>288.539300</td>\n",
       "      <td>280.560330</td>\n",
       "      <td>273.741627</td>\n",
       "      <td>279.002888</td>\n",
       "      <td>285.986219</td>\n",
       "      <td>289.024514</td>\n",
       "      <td>291.650065</td>\n",
       "      <td>294.270906</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.098138</td>\n",
       "      <td>-0.065719</td>\n",
       "      <td>-0.131161</td>\n",
       "      <td>-0.125943</td>\n",
       "      <td>-0.064049</td>\n",
       "      <td>-0.097384</td>\n",
       "      <td>-0.091831</td>\n",
       "      <td>-0.194406</td>\n",
       "      <td>-0.237733</td>\n",
       "      <td>7562.730010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>411081</td>\n",
       "      <td>288.642389</td>\n",
       "      <td>288.402705</td>\n",
       "      <td>280.664249</td>\n",
       "      <td>273.730120</td>\n",
       "      <td>278.969344</td>\n",
       "      <td>286.077579</td>\n",
       "      <td>289.270973</td>\n",
       "      <td>291.754395</td>\n",
       "      <td>294.368068</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.119384</td>\n",
       "      <td>-0.064201</td>\n",
       "      <td>-0.137714</td>\n",
       "      <td>-0.128668</td>\n",
       "      <td>-0.067024</td>\n",
       "      <td>-0.103603</td>\n",
       "      <td>-0.100232</td>\n",
       "      <td>-0.213749</td>\n",
       "      <td>-0.258909</td>\n",
       "      <td>6201.616333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>411424</td>\n",
       "      <td>289.220402</td>\n",
       "      <td>288.087366</td>\n",
       "      <td>280.899611</td>\n",
       "      <td>274.146909</td>\n",
       "      <td>279.037575</td>\n",
       "      <td>285.938342</td>\n",
       "      <td>287.877983</td>\n",
       "      <td>291.425648</td>\n",
       "      <td>293.837042</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.089488</td>\n",
       "      <td>-0.075874</td>\n",
       "      <td>-0.150822</td>\n",
       "      <td>-0.127337</td>\n",
       "      <td>-0.061641</td>\n",
       "      <td>-0.115426</td>\n",
       "      <td>-0.110458</td>\n",
       "      <td>-0.204299</td>\n",
       "      <td>-0.237313</td>\n",
       "      <td>7514.743921</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>411724</td>\n",
       "      <td>289.132369</td>\n",
       "      <td>288.244753</td>\n",
       "      <td>281.891205</td>\n",
       "      <td>273.280044</td>\n",
       "      <td>278.532729</td>\n",
       "      <td>286.194380</td>\n",
       "      <td>287.853709</td>\n",
       "      <td>291.116595</td>\n",
       "      <td>293.398010</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.114599</td>\n",
       "      <td>-0.058061</td>\n",
       "      <td>-0.146556</td>\n",
       "      <td>-0.132673</td>\n",
       "      <td>-0.059871</td>\n",
       "      <td>-0.107120</td>\n",
       "      <td>-0.113756</td>\n",
       "      <td>-0.203619</td>\n",
       "      <td>-0.234055</td>\n",
       "      <td>6127.840909</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>411324</td>\n",
       "      <td>288.648397</td>\n",
       "      <td>288.686682</td>\n",
       "      <td>282.059898</td>\n",
       "      <td>274.839552</td>\n",
       "      <td>279.272524</td>\n",
       "      <td>286.125643</td>\n",
       "      <td>287.968998</td>\n",
       "      <td>291.066013</td>\n",
       "      <td>292.845031</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.105903</td>\n",
       "      <td>-0.057909</td>\n",
       "      <td>-0.141839</td>\n",
       "      <td>-0.142106</td>\n",
       "      <td>-0.072016</td>\n",
       "      <td>-0.126312</td>\n",
       "      <td>-0.120981</td>\n",
       "      <td>-0.241063</td>\n",
       "      <td>-0.271038</td>\n",
       "      <td>5629.379704</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>410122</td>\n",
       "      <td>288.717090</td>\n",
       "      <td>288.705370</td>\n",
       "      <td>280.407667</td>\n",
       "      <td>273.809958</td>\n",
       "      <td>279.201392</td>\n",
       "      <td>286.615278</td>\n",
       "      <td>289.885159</td>\n",
       "      <td>292.453574</td>\n",
       "      <td>294.416954</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.119294</td>\n",
       "      <td>-0.071661</td>\n",
       "      <td>-0.133999</td>\n",
       "      <td>-0.126363</td>\n",
       "      <td>-0.063954</td>\n",
       "      <td>-0.099121</td>\n",
       "      <td>-0.112837</td>\n",
       "      <td>-0.198719</td>\n",
       "      <td>-0.219201</td>\n",
       "      <td>5874.864572</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>102 rows × 386 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       NAME  AvgSurfT_inst_bozhong  AvgSurfT_inst_chumiao   \n",
       "0    410522             288.415883             287.889611  \\\n",
       "1    410421             288.942562             288.839537   \n",
       "2    411726             288.294812             287.940112   \n",
       "3    410822             289.693244             289.603622   \n",
       "4    411082             288.772636             288.539300   \n",
       "..      ...                    ...                    ...   \n",
       "97   411081             288.642389             288.402705   \n",
       "98   411424             289.220402             288.087366   \n",
       "99   411724             289.132369             288.244753   \n",
       "100  411324             288.648397             288.686682   \n",
       "101  410122             288.717090             288.705370   \n",
       "\n",
       "     AvgSurfT_inst_fennie  AvgSurfT_inst_yuedong  AvgSurfT_inst_fanqing   \n",
       "0              278.046775             272.466666             277.901222  \\\n",
       "1              281.306733             273.917084             279.219194   \n",
       "2              281.469932             273.586388             278.770570   \n",
       "3              280.617863             273.919568             279.698123   \n",
       "4              280.560330             273.741627             279.002888   \n",
       "..                    ...                    ...                    ...   \n",
       "97             280.664249             273.730120             278.969344   \n",
       "98             280.899611             274.146909             279.037575   \n",
       "99             281.891205             273.280044             278.532729   \n",
       "100            282.059898             274.839552             279.272524   \n",
       "101            280.407667             273.809958             279.201392   \n",
       "\n",
       "     AvgSurfT_inst_bajie  AvgSurfT_inst_yunsui  AvgSurfT_inst_chousui   \n",
       "0             286.439935            289.705779             292.472507  \\\n",
       "1             286.771180            289.666784             292.250572   \n",
       "2             286.194890            288.324036             291.735998   \n",
       "3             287.864010            290.280989             293.956633   \n",
       "4             285.986219            289.024514             291.650065   \n",
       "..                   ...                   ...                    ...   \n",
       "97            286.077579            289.270973             291.754395   \n",
       "98            285.938342            287.877983             291.425648   \n",
       "99            286.194380            287.853709             291.116595   \n",
       "100           286.125643            287.968998             291.066013   \n",
       "101           286.615278            289.885159             292.453574   \n",
       "\n",
       "     AvgSurfT_inst_kaihua  ...  wet_yuedong  wet_fanqing  wet_bajie   \n",
       "0              294.452793  ...    -0.117180    -0.068961  -0.131784  \\\n",
       "1              294.666358  ...    -0.136607    -0.066107  -0.128526   \n",
       "2              293.058088  ...    -0.124971    -0.054457  -0.140474   \n",
       "3              295.778920  ...    -0.110651    -0.069379  -0.113863   \n",
       "4              294.270906  ...    -0.098138    -0.065719  -0.131161   \n",
       "..                    ...  ...          ...          ...        ...   \n",
       "97             294.368068  ...    -0.119384    -0.064201  -0.137714   \n",
       "98             293.837042  ...    -0.089488    -0.075874  -0.150822   \n",
       "99             293.398010  ...    -0.114599    -0.058061  -0.146556   \n",
       "100            292.845031  ...    -0.105903    -0.057909  -0.141839   \n",
       "101            294.416954  ...    -0.119294    -0.071661  -0.133999   \n",
       "\n",
       "     wet_yunsui  wet_chousui  wet_kaihua  wet_guanjiang  wet_chengshu   \n",
       "0     -0.119223    -0.066014   -0.089520      -0.112424     -0.192579  \\\n",
       "1     -0.126215    -0.064668   -0.098119      -0.109716     -0.220763   \n",
       "2     -0.134938    -0.071561   -0.128855      -0.122227     -0.238291   \n",
       "3     -0.122631    -0.066292   -0.081511      -0.106181     -0.216895   \n",
       "4     -0.125943    -0.064049   -0.097384      -0.091831     -0.194406   \n",
       "..          ...          ...         ...            ...           ...   \n",
       "97    -0.128668    -0.067024   -0.103603      -0.100232     -0.213749   \n",
       "98    -0.127337    -0.061641   -0.115426      -0.110458     -0.204299   \n",
       "99    -0.132673    -0.059871   -0.107120      -0.113756     -0.203619   \n",
       "100   -0.142106    -0.072016   -0.126312      -0.120981     -0.241063   \n",
       "101   -0.126363    -0.063954   -0.099121      -0.112837     -0.198719   \n",
       "\n",
       "     wet_shouhuo           亩产  \n",
       "0      -0.203809  7113.698630  \n",
       "1      -0.244596  5645.657187  \n",
       "2      -0.278113  5905.730129  \n",
       "3      -0.252480  7997.010463  \n",
       "4      -0.237733  7562.730010  \n",
       "..           ...          ...  \n",
       "97     -0.258909  6201.616333  \n",
       "98     -0.237313  7514.743921  \n",
       "99     -0.234055  6127.840909  \n",
       "100    -0.271038  5629.379704  \n",
       "101    -0.219201  5874.864572  \n",
       "\n",
       "[102 rows x 386 columns]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "period_17"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6311d204-27ad-44ca-9c78-09a3d57b88c7",
   "metadata": {},
   "source": [
    "### 2018"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "3da76d1d-963d-44fb-b640-1e0a04f1e78a",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "period_18 = pd.DataFrame()\n",
    "period_18['NAME']=df_18['NAME']\n",
    "for i in range(32):\n",
    "    period_18[columns[i]+'_'+'bozhong']=(df_18.iloc[:,1+31*i+0]+df_18.iloc[:,1+31*i+1])/2\n",
    "    period_18[columns[i]+'_'+'chumiao']=(df_18.iloc[:,1+31*i+1]+df_18.iloc[:,1+31*i+2]+df_18.iloc[:,1+31*i+3])/3\n",
    "    period_18[columns[i]+'_'+'fennie']=(df_18.iloc[:,1+31*i+3]+df_18.iloc[:,1+31*i+4]+df_18.iloc[:,1+31*i+5]+df_18.iloc[:,1+31*i+6]\n",
    "                                   +df_18.iloc[:,1+31*i+7]+df_18.iloc[:,1+31*i+8]+df_18.iloc[:,1+31*i+9])/7\n",
    "    period_18[columns[i]+'_'+'yuedong']=(df_18.iloc[:,1+31*i+10]+df_18.iloc[:,1+31*i+11]+df_18.iloc[:,1+31*i+12]\n",
    "                                    +df_18.iloc[:,1+31*i+13]+df_18.iloc[:,1+31*i+14])/5\n",
    "    period_18[columns[i]+'_'+'fanqing']=(df_18.iloc[:,1+31*i+15]+df_18.iloc[:,1+31*i+16]+df_18.iloc[:,1+31*i+17]\n",
    "                                    +df_18.iloc[:,1+31*i+18])/4\n",
    "    period_18[columns[i]+'_'+'bajie']=(df_18.iloc[:,1+31*i+19]+df_18.iloc[:,1+31*i+20]+df_18.iloc[:,1+31*i+21]\n",
    "                                    +df_18.iloc[:,1+31*i+22])/4\n",
    "    period_18[columns[i]+'_'+'yunsui']=df_18.iloc[:,1+31*i+23]\n",
    "    period_18[columns[i]+'_'+'chousui']=df_18.iloc[:,1+31*i+24]\n",
    "    period_18[columns[i]+'_'+'kaihua']=df_18.iloc[:,1+31*i+25]\n",
    "    period_18[columns[i]+'_'+'guanjiang']=(df_18.iloc[:,1+31*i+26]+df_18.iloc[:,1+31*i+27]+df_18.iloc[:,1+31*i+28]\n",
    "                                +df_18.iloc[:,1+31*i+29])/4\n",
    "    period_18[columns[i]+'_'+'chengshu']=(df_18.iloc[:,1+31*i+29]+df_18.iloc[:,1+31*i+30])/2\n",
    "    period_18[columns[i]+'_'+'shouhuo']=df_18.iloc[:,1+31*i+30]\n",
    "period_18['亩产']=df_18['2018年小麦亩产']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "aa32feb1-3ba5-4ee1-9d1b-e2d2b965d190",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>NAME</th>\n",
       "      <th>AvgSurfT_inst_bozhong</th>\n",
       "      <th>AvgSurfT_inst_chumiao</th>\n",
       "      <th>AvgSurfT_inst_fennie</th>\n",
       "      <th>AvgSurfT_inst_yuedong</th>\n",
       "      <th>AvgSurfT_inst_fanqing</th>\n",
       "      <th>AvgSurfT_inst_bajie</th>\n",
       "      <th>AvgSurfT_inst_yunsui</th>\n",
       "      <th>AvgSurfT_inst_chousui</th>\n",
       "      <th>AvgSurfT_inst_kaihua</th>\n",
       "      <th>...</th>\n",
       "      <th>wet_yuedong</th>\n",
       "      <th>wet_fanqing</th>\n",
       "      <th>wet_bajie</th>\n",
       "      <th>wet_yunsui</th>\n",
       "      <th>wet_chousui</th>\n",
       "      <th>wet_kaihua</th>\n",
       "      <th>wet_guanjiang</th>\n",
       "      <th>wet_chengshu</th>\n",
       "      <th>wet_shouhuo</th>\n",
       "      <th>亩产</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>410522</td>\n",
       "      <td>288.471255</td>\n",
       "      <td>286.595627</td>\n",
       "      <td>278.560222</td>\n",
       "      <td>272.401524</td>\n",
       "      <td>277.358920</td>\n",
       "      <td>286.817016</td>\n",
       "      <td>285.855485</td>\n",
       "      <td>290.992927</td>\n",
       "      <td>288.898038</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.128118</td>\n",
       "      <td>-0.113624</td>\n",
       "      <td>-0.122264</td>\n",
       "      <td>-0.144440</td>\n",
       "      <td>-0.104964</td>\n",
       "      <td>-0.083144</td>\n",
       "      <td>-0.107502</td>\n",
       "      <td>-0.124372</td>\n",
       "      <td>-0.133460</td>\n",
       "      <td>6281.520358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>410421</td>\n",
       "      <td>291.144335</td>\n",
       "      <td>289.083697</td>\n",
       "      <td>281.213664</td>\n",
       "      <td>274.906188</td>\n",
       "      <td>278.679653</td>\n",
       "      <td>288.205581</td>\n",
       "      <td>288.365078</td>\n",
       "      <td>292.349988</td>\n",
       "      <td>290.717329</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.114980</td>\n",
       "      <td>-0.090552</td>\n",
       "      <td>-0.123804</td>\n",
       "      <td>-0.146764</td>\n",
       "      <td>-0.110925</td>\n",
       "      <td>-0.087208</td>\n",
       "      <td>-0.125961</td>\n",
       "      <td>-0.174672</td>\n",
       "      <td>-0.182486</td>\n",
       "      <td>5477.930904</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>411726</td>\n",
       "      <td>290.531211</td>\n",
       "      <td>288.521102</td>\n",
       "      <td>281.211449</td>\n",
       "      <td>275.051569</td>\n",
       "      <td>277.933231</td>\n",
       "      <td>287.775010</td>\n",
       "      <td>288.320523</td>\n",
       "      <td>291.776774</td>\n",
       "      <td>290.066040</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.142723</td>\n",
       "      <td>-0.081269</td>\n",
       "      <td>-0.145096</td>\n",
       "      <td>-0.144290</td>\n",
       "      <td>-0.128244</td>\n",
       "      <td>-0.134192</td>\n",
       "      <td>-0.153687</td>\n",
       "      <td>-0.187144</td>\n",
       "      <td>-0.192204</td>\n",
       "      <td>5675.344673</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>410822</td>\n",
       "      <td>290.747257</td>\n",
       "      <td>288.868442</td>\n",
       "      <td>280.733464</td>\n",
       "      <td>274.196129</td>\n",
       "      <td>278.558338</td>\n",
       "      <td>288.511855</td>\n",
       "      <td>288.685513</td>\n",
       "      <td>291.997189</td>\n",
       "      <td>290.574321</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.108580</td>\n",
       "      <td>-0.078074</td>\n",
       "      <td>-0.113029</td>\n",
       "      <td>-0.147778</td>\n",
       "      <td>-0.093812</td>\n",
       "      <td>-0.075945</td>\n",
       "      <td>-0.098848</td>\n",
       "      <td>-0.121015</td>\n",
       "      <td>-0.138381</td>\n",
       "      <td>7567.491480</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>411082</td>\n",
       "      <td>290.640113</td>\n",
       "      <td>288.470156</td>\n",
       "      <td>280.699317</td>\n",
       "      <td>274.333701</td>\n",
       "      <td>278.118715</td>\n",
       "      <td>287.289627</td>\n",
       "      <td>287.386645</td>\n",
       "      <td>291.493979</td>\n",
       "      <td>289.842517</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.109723</td>\n",
       "      <td>-0.115663</td>\n",
       "      <td>-0.123092</td>\n",
       "      <td>-0.137645</td>\n",
       "      <td>-0.101245</td>\n",
       "      <td>-0.087265</td>\n",
       "      <td>-0.126575</td>\n",
       "      <td>-0.171289</td>\n",
       "      <td>-0.194278</td>\n",
       "      <td>7389.914796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>411081</td>\n",
       "      <td>290.688442</td>\n",
       "      <td>288.439430</td>\n",
       "      <td>280.791464</td>\n",
       "      <td>274.415854</td>\n",
       "      <td>278.259954</td>\n",
       "      <td>287.564917</td>\n",
       "      <td>287.651877</td>\n",
       "      <td>291.662775</td>\n",
       "      <td>290.134467</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.112221</td>\n",
       "      <td>-0.098388</td>\n",
       "      <td>-0.128366</td>\n",
       "      <td>-0.153278</td>\n",
       "      <td>-0.119091</td>\n",
       "      <td>-0.098947</td>\n",
       "      <td>-0.135593</td>\n",
       "      <td>-0.166879</td>\n",
       "      <td>-0.182910</td>\n",
       "      <td>6050.877560</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>411424</td>\n",
       "      <td>290.452209</td>\n",
       "      <td>288.411012</td>\n",
       "      <td>281.146960</td>\n",
       "      <td>274.695064</td>\n",
       "      <td>278.270456</td>\n",
       "      <td>286.895756</td>\n",
       "      <td>287.491974</td>\n",
       "      <td>291.565269</td>\n",
       "      <td>289.114848</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.126745</td>\n",
       "      <td>-0.094333</td>\n",
       "      <td>-0.116705</td>\n",
       "      <td>-0.137264</td>\n",
       "      <td>-0.102037</td>\n",
       "      <td>-0.084537</td>\n",
       "      <td>-0.111493</td>\n",
       "      <td>-0.153150</td>\n",
       "      <td>-0.167774</td>\n",
       "      <td>7199.575672</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>411724</td>\n",
       "      <td>291.715395</td>\n",
       "      <td>289.528198</td>\n",
       "      <td>281.964176</td>\n",
       "      <td>275.537134</td>\n",
       "      <td>277.582704</td>\n",
       "      <td>287.346692</td>\n",
       "      <td>288.449515</td>\n",
       "      <td>291.634359</td>\n",
       "      <td>290.022973</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.121135</td>\n",
       "      <td>-0.034134</td>\n",
       "      <td>-0.112116</td>\n",
       "      <td>-0.115227</td>\n",
       "      <td>-0.087623</td>\n",
       "      <td>-0.119632</td>\n",
       "      <td>-0.122466</td>\n",
       "      <td>-0.189549</td>\n",
       "      <td>-0.224899</td>\n",
       "      <td>5636.836839</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>411324</td>\n",
       "      <td>290.952537</td>\n",
       "      <td>289.429294</td>\n",
       "      <td>281.902221</td>\n",
       "      <td>275.566071</td>\n",
       "      <td>278.541396</td>\n",
       "      <td>287.580054</td>\n",
       "      <td>288.298837</td>\n",
       "      <td>291.555130</td>\n",
       "      <td>290.527979</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.137634</td>\n",
       "      <td>-0.102790</td>\n",
       "      <td>-0.129705</td>\n",
       "      <td>-0.142392</td>\n",
       "      <td>-0.127474</td>\n",
       "      <td>-0.123776</td>\n",
       "      <td>-0.148819</td>\n",
       "      <td>-0.190007</td>\n",
       "      <td>-0.202474</td>\n",
       "      <td>5370.682570</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>410122</td>\n",
       "      <td>290.076012</td>\n",
       "      <td>288.286934</td>\n",
       "      <td>280.485366</td>\n",
       "      <td>274.068836</td>\n",
       "      <td>277.906281</td>\n",
       "      <td>287.990707</td>\n",
       "      <td>287.328393</td>\n",
       "      <td>291.460842</td>\n",
       "      <td>289.833146</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.128102</td>\n",
       "      <td>-0.127909</td>\n",
       "      <td>-0.130306</td>\n",
       "      <td>-0.144380</td>\n",
       "      <td>-0.115090</td>\n",
       "      <td>-0.097582</td>\n",
       "      <td>-0.136071</td>\n",
       "      <td>-0.158746</td>\n",
       "      <td>-0.161893</td>\n",
       "      <td>5808.356911</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>102 rows × 386 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       NAME  AvgSurfT_inst_bozhong  AvgSurfT_inst_chumiao   \n",
       "0    410522             288.471255             286.595627  \\\n",
       "1    410421             291.144335             289.083697   \n",
       "2    411726             290.531211             288.521102   \n",
       "3    410822             290.747257             288.868442   \n",
       "4    411082             290.640113             288.470156   \n",
       "..      ...                    ...                    ...   \n",
       "97   411081             290.688442             288.439430   \n",
       "98   411424             290.452209             288.411012   \n",
       "99   411724             291.715395             289.528198   \n",
       "100  411324             290.952537             289.429294   \n",
       "101  410122             290.076012             288.286934   \n",
       "\n",
       "     AvgSurfT_inst_fennie  AvgSurfT_inst_yuedong  AvgSurfT_inst_fanqing   \n",
       "0              278.560222             272.401524             277.358920  \\\n",
       "1              281.213664             274.906188             278.679653   \n",
       "2              281.211449             275.051569             277.933231   \n",
       "3              280.733464             274.196129             278.558338   \n",
       "4              280.699317             274.333701             278.118715   \n",
       "..                    ...                    ...                    ...   \n",
       "97             280.791464             274.415854             278.259954   \n",
       "98             281.146960             274.695064             278.270456   \n",
       "99             281.964176             275.537134             277.582704   \n",
       "100            281.902221             275.566071             278.541396   \n",
       "101            280.485366             274.068836             277.906281   \n",
       "\n",
       "     AvgSurfT_inst_bajie  AvgSurfT_inst_yunsui  AvgSurfT_inst_chousui   \n",
       "0             286.817016            285.855485             290.992927  \\\n",
       "1             288.205581            288.365078             292.349988   \n",
       "2             287.775010            288.320523             291.776774   \n",
       "3             288.511855            288.685513             291.997189   \n",
       "4             287.289627            287.386645             291.493979   \n",
       "..                   ...                   ...                    ...   \n",
       "97            287.564917            287.651877             291.662775   \n",
       "98            286.895756            287.491974             291.565269   \n",
       "99            287.346692            288.449515             291.634359   \n",
       "100           287.580054            288.298837             291.555130   \n",
       "101           287.990707            287.328393             291.460842   \n",
       "\n",
       "     AvgSurfT_inst_kaihua  ...  wet_yuedong  wet_fanqing  wet_bajie   \n",
       "0              288.898038  ...    -0.128118    -0.113624  -0.122264  \\\n",
       "1              290.717329  ...    -0.114980    -0.090552  -0.123804   \n",
       "2              290.066040  ...    -0.142723    -0.081269  -0.145096   \n",
       "3              290.574321  ...    -0.108580    -0.078074  -0.113029   \n",
       "4              289.842517  ...    -0.109723    -0.115663  -0.123092   \n",
       "..                    ...  ...          ...          ...        ...   \n",
       "97             290.134467  ...    -0.112221    -0.098388  -0.128366   \n",
       "98             289.114848  ...    -0.126745    -0.094333  -0.116705   \n",
       "99             290.022973  ...    -0.121135    -0.034134  -0.112116   \n",
       "100            290.527979  ...    -0.137634    -0.102790  -0.129705   \n",
       "101            289.833146  ...    -0.128102    -0.127909  -0.130306   \n",
       "\n",
       "     wet_yunsui  wet_chousui  wet_kaihua  wet_guanjiang  wet_chengshu   \n",
       "0     -0.144440    -0.104964   -0.083144      -0.107502     -0.124372  \\\n",
       "1     -0.146764    -0.110925   -0.087208      -0.125961     -0.174672   \n",
       "2     -0.144290    -0.128244   -0.134192      -0.153687     -0.187144   \n",
       "3     -0.147778    -0.093812   -0.075945      -0.098848     -0.121015   \n",
       "4     -0.137645    -0.101245   -0.087265      -0.126575     -0.171289   \n",
       "..          ...          ...         ...            ...           ...   \n",
       "97    -0.153278    -0.119091   -0.098947      -0.135593     -0.166879   \n",
       "98    -0.137264    -0.102037   -0.084537      -0.111493     -0.153150   \n",
       "99    -0.115227    -0.087623   -0.119632      -0.122466     -0.189549   \n",
       "100   -0.142392    -0.127474   -0.123776      -0.148819     -0.190007   \n",
       "101   -0.144380    -0.115090   -0.097582      -0.136071     -0.158746   \n",
       "\n",
       "     wet_shouhuo           亩产  \n",
       "0      -0.133460  6281.520358  \n",
       "1      -0.182486  5477.930904  \n",
       "2      -0.192204  5675.344673  \n",
       "3      -0.138381  7567.491480  \n",
       "4      -0.194278  7389.914796  \n",
       "..           ...          ...  \n",
       "97     -0.182910  6050.877560  \n",
       "98     -0.167774  7199.575672  \n",
       "99     -0.224899  5636.836839  \n",
       "100    -0.202474  5370.682570  \n",
       "101    -0.161893  5808.356911  \n",
       "\n",
       "[102 rows x 386 columns]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "period_18"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ed09d556-9b26-468a-8f98-5160be7ce59c",
   "metadata": {},
   "source": [
    "### 2019"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "595c7d77-ee88-4014-8e96-3945c7b99a7f",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "period_19 = pd.DataFrame()\n",
    "period_19['NAME']=df_19['NAME']\n",
    "for i in range(32):\n",
    "    period_19[columns[i]+'_'+'bozhong']=(df_19.iloc[:,1+32*i+0]+df_19.iloc[:,1+32*i+1])/2\n",
    "    period_19[columns[i]+'_'+'chumiao']=(df_19.iloc[:,1+32*i+1]+df_19.iloc[:,1+32*i+2]+df_19.iloc[:,1+32*i+3])/3\n",
    "    period_19[columns[i]+'_'+'fennie']=(df_19.iloc[:,1+32*i+3]+df_19.iloc[:,1+32*i+4]+df_19.iloc[:,1+32*i+5]+df_19.iloc[:,1+32*i+6]\n",
    "                                   +df_19.iloc[:,1+32*i+7]+df_19.iloc[:,1+32*i+8]+df_19.iloc[:,1+32*i+9])/7\n",
    "    period_19[columns[i]+'_'+'yuedong']=(df_19.iloc[:,1+32*i+10]+df_19.iloc[:,1+32*i+11]+df_19.iloc[:,1+32*i+12]\n",
    "                                    +df_19.iloc[:,1+32*i+13]+df_19.iloc[:,1+32*i+14])/5\n",
    "    period_19[columns[i]+'_'+'fanqing']=(df_19.iloc[:,1+32*i+15]+df_19.iloc[:,1+32*i+16]+df_19.iloc[:,1+32*i+17]\n",
    "                                    +df_19.iloc[:,1+32*i+18])/4\n",
    "    period_19[columns[i]+'_'+'bajie']=(df_19.iloc[:,1+32*i+19]+df_19.iloc[:,1+32*i+20]+df_19.iloc[:,1+32*i+21]\n",
    "                                    +df_19.iloc[:,1+32*i+22])/4\n",
    "    period_19[columns[i]+'_'+'yunsui']=df_19.iloc[:,1+32*i+23]\n",
    "    period_19[columns[i]+'_'+'chousui']=df_19.iloc[:,1+32*i+24]\n",
    "    period_19[columns[i]+'_'+'kaihua']=df_19.iloc[:,1+32*i+25]\n",
    "    period_19[columns[i]+'_'+'guanjiang']=(df_19.iloc[:,1+32*i+26]+df_19.iloc[:,1+32*i+27]+df_19.iloc[:,1+32*i+28]\n",
    "                                +df_19.iloc[:,1+32*i+29])/4\n",
    "    period_19[columns[i]+'_'+'chengshu']=(df_19.iloc[:,1+32*i+29]+df_19.iloc[:,1+32*i+30])/2\n",
    "    period_19[columns[i]+'_'+'shouhuo']=(df_19.iloc[:,1+32*i+30]+df_19.iloc[:,1+32*i+31])/2\n",
    "period_19['亩产']=df_19['2019年小麦亩产']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "bfd2f407-3926-4bb2-8869-796f2e718ddf",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>NAME</th>\n",
       "      <th>AvgSurfT_inst_bozhong</th>\n",
       "      <th>AvgSurfT_inst_chumiao</th>\n",
       "      <th>AvgSurfT_inst_fennie</th>\n",
       "      <th>AvgSurfT_inst_yuedong</th>\n",
       "      <th>AvgSurfT_inst_fanqing</th>\n",
       "      <th>AvgSurfT_inst_bajie</th>\n",
       "      <th>AvgSurfT_inst_yunsui</th>\n",
       "      <th>AvgSurfT_inst_chousui</th>\n",
       "      <th>AvgSurfT_inst_kaihua</th>\n",
       "      <th>...</th>\n",
       "      <th>wet_yuedong</th>\n",
       "      <th>wet_fanqing</th>\n",
       "      <th>wet_bajie</th>\n",
       "      <th>wet_yunsui</th>\n",
       "      <th>wet_chousui</th>\n",
       "      <th>wet_kaihua</th>\n",
       "      <th>wet_guanjiang</th>\n",
       "      <th>wet_chengshu</th>\n",
       "      <th>wet_shouhuo</th>\n",
       "      <th>亩产</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>410522</td>\n",
       "      <td>289.821290</td>\n",
       "      <td>288.557068</td>\n",
       "      <td>279.611388</td>\n",
       "      <td>274.461211</td>\n",
       "      <td>279.942577</td>\n",
       "      <td>286.501824</td>\n",
       "      <td>286.889312</td>\n",
       "      <td>290.751723</td>\n",
       "      <td>291.331486</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.110776</td>\n",
       "      <td>-0.132914</td>\n",
       "      <td>-0.129986</td>\n",
       "      <td>-0.098564</td>\n",
       "      <td>-0.100840</td>\n",
       "      <td>-0.087377</td>\n",
       "      <td>-0.098324</td>\n",
       "      <td>-0.129639</td>\n",
       "      <td>-0.192589</td>\n",
       "      <td>6874.968314</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>410421</td>\n",
       "      <td>290.658430</td>\n",
       "      <td>289.816592</td>\n",
       "      <td>282.619490</td>\n",
       "      <td>277.163759</td>\n",
       "      <td>280.767141</td>\n",
       "      <td>286.328475</td>\n",
       "      <td>286.664948</td>\n",
       "      <td>289.661496</td>\n",
       "      <td>290.970359</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.147864</td>\n",
       "      <td>-0.129530</td>\n",
       "      <td>-0.129055</td>\n",
       "      <td>-0.099770</td>\n",
       "      <td>-0.090006</td>\n",
       "      <td>-0.116332</td>\n",
       "      <td>-0.145914</td>\n",
       "      <td>-0.209684</td>\n",
       "      <td>-0.192837</td>\n",
       "      <td>5819.570675</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>411726</td>\n",
       "      <td>290.218230</td>\n",
       "      <td>289.630163</td>\n",
       "      <td>283.002182</td>\n",
       "      <td>277.218040</td>\n",
       "      <td>281.230715</td>\n",
       "      <td>286.226853</td>\n",
       "      <td>286.319379</td>\n",
       "      <td>288.548757</td>\n",
       "      <td>289.719051</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.137910</td>\n",
       "      <td>-0.143510</td>\n",
       "      <td>-0.169906</td>\n",
       "      <td>-0.136874</td>\n",
       "      <td>-0.112860</td>\n",
       "      <td>-0.153288</td>\n",
       "      <td>-0.168242</td>\n",
       "      <td>-0.206572</td>\n",
       "      <td>-0.189773</td>\n",
       "      <td>6006.876753</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>410822</td>\n",
       "      <td>290.532986</td>\n",
       "      <td>289.589751</td>\n",
       "      <td>281.472694</td>\n",
       "      <td>276.197961</td>\n",
       "      <td>280.789759</td>\n",
       "      <td>287.198441</td>\n",
       "      <td>287.626052</td>\n",
       "      <td>290.802627</td>\n",
       "      <td>291.540026</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.114937</td>\n",
       "      <td>-0.125569</td>\n",
       "      <td>-0.122402</td>\n",
       "      <td>-0.096344</td>\n",
       "      <td>-0.077180</td>\n",
       "      <td>-0.084120</td>\n",
       "      <td>-0.104060</td>\n",
       "      <td>-0.160910</td>\n",
       "      <td>-0.184292</td>\n",
       "      <td>7892.650763</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>411082</td>\n",
       "      <td>290.773593</td>\n",
       "      <td>289.863253</td>\n",
       "      <td>282.310135</td>\n",
       "      <td>276.858191</td>\n",
       "      <td>280.784052</td>\n",
       "      <td>286.028435</td>\n",
       "      <td>286.034641</td>\n",
       "      <td>289.497256</td>\n",
       "      <td>290.222689</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.148937</td>\n",
       "      <td>-0.125366</td>\n",
       "      <td>-0.137146</td>\n",
       "      <td>-0.094940</td>\n",
       "      <td>-0.089326</td>\n",
       "      <td>-0.100646</td>\n",
       "      <td>-0.121974</td>\n",
       "      <td>-0.192350</td>\n",
       "      <td>-0.203617</td>\n",
       "      <td>7801.056862</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>411081</td>\n",
       "      <td>290.289776</td>\n",
       "      <td>289.509653</td>\n",
       "      <td>282.208498</td>\n",
       "      <td>276.852893</td>\n",
       "      <td>280.582545</td>\n",
       "      <td>285.921533</td>\n",
       "      <td>286.232885</td>\n",
       "      <td>289.617271</td>\n",
       "      <td>290.450987</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.136895</td>\n",
       "      <td>-0.131368</td>\n",
       "      <td>-0.140964</td>\n",
       "      <td>-0.112815</td>\n",
       "      <td>-0.101634</td>\n",
       "      <td>-0.125029</td>\n",
       "      <td>-0.143917</td>\n",
       "      <td>-0.193379</td>\n",
       "      <td>-0.184330</td>\n",
       "      <td>6139.531482</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>411424</td>\n",
       "      <td>291.353326</td>\n",
       "      <td>290.026105</td>\n",
       "      <td>282.717769</td>\n",
       "      <td>277.165532</td>\n",
       "      <td>281.185240</td>\n",
       "      <td>285.887562</td>\n",
       "      <td>286.382702</td>\n",
       "      <td>289.162019</td>\n",
       "      <td>289.708324</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.137191</td>\n",
       "      <td>-0.136309</td>\n",
       "      <td>-0.149145</td>\n",
       "      <td>-0.089157</td>\n",
       "      <td>-0.089073</td>\n",
       "      <td>-0.096321</td>\n",
       "      <td>-0.132237</td>\n",
       "      <td>-0.205663</td>\n",
       "      <td>-0.183977</td>\n",
       "      <td>7455.006062</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>411724</td>\n",
       "      <td>291.868321</td>\n",
       "      <td>290.950728</td>\n",
       "      <td>283.790115</td>\n",
       "      <td>277.453146</td>\n",
       "      <td>281.537194</td>\n",
       "      <td>286.123456</td>\n",
       "      <td>286.286226</td>\n",
       "      <td>288.705639</td>\n",
       "      <td>290.320593</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.152929</td>\n",
       "      <td>-0.129068</td>\n",
       "      <td>-0.165935</td>\n",
       "      <td>-0.094109</td>\n",
       "      <td>-0.094483</td>\n",
       "      <td>-0.112917</td>\n",
       "      <td>-0.169091</td>\n",
       "      <td>-0.266572</td>\n",
       "      <td>-0.217591</td>\n",
       "      <td>6000.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>411324</td>\n",
       "      <td>290.122282</td>\n",
       "      <td>289.949273</td>\n",
       "      <td>283.563952</td>\n",
       "      <td>277.760817</td>\n",
       "      <td>281.211781</td>\n",
       "      <td>286.062588</td>\n",
       "      <td>286.136590</td>\n",
       "      <td>287.969113</td>\n",
       "      <td>289.912847</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.155874</td>\n",
       "      <td>-0.135164</td>\n",
       "      <td>-0.162474</td>\n",
       "      <td>-0.113248</td>\n",
       "      <td>-0.103993</td>\n",
       "      <td>-0.135513</td>\n",
       "      <td>-0.148641</td>\n",
       "      <td>-0.194748</td>\n",
       "      <td>-0.185707</td>\n",
       "      <td>5411.644205</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>410122</td>\n",
       "      <td>290.674952</td>\n",
       "      <td>289.766336</td>\n",
       "      <td>281.988962</td>\n",
       "      <td>276.408597</td>\n",
       "      <td>280.657630</td>\n",
       "      <td>286.456666</td>\n",
       "      <td>286.542953</td>\n",
       "      <td>289.994435</td>\n",
       "      <td>290.645874</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.126804</td>\n",
       "      <td>-0.139253</td>\n",
       "      <td>-0.141010</td>\n",
       "      <td>-0.112554</td>\n",
       "      <td>-0.097010</td>\n",
       "      <td>-0.113067</td>\n",
       "      <td>-0.126092</td>\n",
       "      <td>-0.167359</td>\n",
       "      <td>-0.180723</td>\n",
       "      <td>6214.100124</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>102 rows × 386 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       NAME  AvgSurfT_inst_bozhong  AvgSurfT_inst_chumiao   \n",
       "0    410522             289.821290             288.557068  \\\n",
       "1    410421             290.658430             289.816592   \n",
       "2    411726             290.218230             289.630163   \n",
       "3    410822             290.532986             289.589751   \n",
       "4    411082             290.773593             289.863253   \n",
       "..      ...                    ...                    ...   \n",
       "97   411081             290.289776             289.509653   \n",
       "98   411424             291.353326             290.026105   \n",
       "99   411724             291.868321             290.950728   \n",
       "100  411324             290.122282             289.949273   \n",
       "101  410122             290.674952             289.766336   \n",
       "\n",
       "     AvgSurfT_inst_fennie  AvgSurfT_inst_yuedong  AvgSurfT_inst_fanqing   \n",
       "0              279.611388             274.461211             279.942577  \\\n",
       "1              282.619490             277.163759             280.767141   \n",
       "2              283.002182             277.218040             281.230715   \n",
       "3              281.472694             276.197961             280.789759   \n",
       "4              282.310135             276.858191             280.784052   \n",
       "..                    ...                    ...                    ...   \n",
       "97             282.208498             276.852893             280.582545   \n",
       "98             282.717769             277.165532             281.185240   \n",
       "99             283.790115             277.453146             281.537194   \n",
       "100            283.563952             277.760817             281.211781   \n",
       "101            281.988962             276.408597             280.657630   \n",
       "\n",
       "     AvgSurfT_inst_bajie  AvgSurfT_inst_yunsui  AvgSurfT_inst_chousui   \n",
       "0             286.501824            286.889312             290.751723  \\\n",
       "1             286.328475            286.664948             289.661496   \n",
       "2             286.226853            286.319379             288.548757   \n",
       "3             287.198441            287.626052             290.802627   \n",
       "4             286.028435            286.034641             289.497256   \n",
       "..                   ...                   ...                    ...   \n",
       "97            285.921533            286.232885             289.617271   \n",
       "98            285.887562            286.382702             289.162019   \n",
       "99            286.123456            286.286226             288.705639   \n",
       "100           286.062588            286.136590             287.969113   \n",
       "101           286.456666            286.542953             289.994435   \n",
       "\n",
       "     AvgSurfT_inst_kaihua  ...  wet_yuedong  wet_fanqing  wet_bajie   \n",
       "0              291.331486  ...    -0.110776    -0.132914  -0.129986  \\\n",
       "1              290.970359  ...    -0.147864    -0.129530  -0.129055   \n",
       "2              289.719051  ...    -0.137910    -0.143510  -0.169906   \n",
       "3              291.540026  ...    -0.114937    -0.125569  -0.122402   \n",
       "4              290.222689  ...    -0.148937    -0.125366  -0.137146   \n",
       "..                    ...  ...          ...          ...        ...   \n",
       "97             290.450987  ...    -0.136895    -0.131368  -0.140964   \n",
       "98             289.708324  ...    -0.137191    -0.136309  -0.149145   \n",
       "99             290.320593  ...    -0.152929    -0.129068  -0.165935   \n",
       "100            289.912847  ...    -0.155874    -0.135164  -0.162474   \n",
       "101            290.645874  ...    -0.126804    -0.139253  -0.141010   \n",
       "\n",
       "     wet_yunsui  wet_chousui  wet_kaihua  wet_guanjiang  wet_chengshu   \n",
       "0     -0.098564    -0.100840   -0.087377      -0.098324     -0.129639  \\\n",
       "1     -0.099770    -0.090006   -0.116332      -0.145914     -0.209684   \n",
       "2     -0.136874    -0.112860   -0.153288      -0.168242     -0.206572   \n",
       "3     -0.096344    -0.077180   -0.084120      -0.104060     -0.160910   \n",
       "4     -0.094940    -0.089326   -0.100646      -0.121974     -0.192350   \n",
       "..          ...          ...         ...            ...           ...   \n",
       "97    -0.112815    -0.101634   -0.125029      -0.143917     -0.193379   \n",
       "98    -0.089157    -0.089073   -0.096321      -0.132237     -0.205663   \n",
       "99    -0.094109    -0.094483   -0.112917      -0.169091     -0.266572   \n",
       "100   -0.113248    -0.103993   -0.135513      -0.148641     -0.194748   \n",
       "101   -0.112554    -0.097010   -0.113067      -0.126092     -0.167359   \n",
       "\n",
       "     wet_shouhuo           亩产  \n",
       "0      -0.192589  6874.968314  \n",
       "1      -0.192837  5819.570675  \n",
       "2      -0.189773  6006.876753  \n",
       "3      -0.184292  7892.650763  \n",
       "4      -0.203617  7801.056862  \n",
       "..           ...          ...  \n",
       "97     -0.184330  6139.531482  \n",
       "98     -0.183977  7455.006062  \n",
       "99     -0.217591  6000.000000  \n",
       "100    -0.185707  5411.644205  \n",
       "101    -0.180723  6214.100124  \n",
       "\n",
       "[102 rows x 386 columns]"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "period_19"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7f3bc2e6-e7b9-49ea-9fba-17263145190f",
   "metadata": {},
   "source": [
    "### 2020"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "5a45c649-4a2d-46b0-8c3b-d44e50255151",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "period_20 = pd.DataFrame()\n",
    "period_20['NAME']=df_20['NAME']\n",
    "for i in range(32):\n",
    "    period_20[columns[i]+'_'+'bozhong']=(df_20.iloc[:,1+32*i+0]+df_20.iloc[:,1+32*i+1])/2\n",
    "    period_20[columns[i]+'_'+'chumiao']=(df_20.iloc[:,1+32*i+1]+df_20.iloc[:,1+32*i+2]+df_20.iloc[:,1+32*i+3])/3\n",
    "    period_20[columns[i]+'_'+'fennie']=(df_20.iloc[:,1+32*i+4]+df_20.iloc[:,1+32*i+5]+df_20.iloc[:,1+32*i+6]\n",
    "                                   +df_20.iloc[:,1+32*i+7]+df_20.iloc[:,1+32*i+8]+df_20.iloc[:,1+32*i+9])/6\n",
    "    period_20[columns[i]+'_'+'yuedong']=(df_20.iloc[:,1+32*i+10]+df_20.iloc[:,1+32*i+11]+df_20.iloc[:,1+32*i+12]\n",
    "                                    +df_20.iloc[:,1+32*i+13]+df_20.iloc[:,1+32*i+14])/5\n",
    "    period_20[columns[i]+'_'+'fanqing']=(df_20.iloc[:,1+32*i+15]+df_20.iloc[:,1+32*i+16]+df_20.iloc[:,1+32*i+17]\n",
    "                                    +df_20.iloc[:,1+32*i+18])/4\n",
    "    period_20[columns[i]+'_'+'bajie']=(df_20.iloc[:,1+32*i+19]+df_20.iloc[:,1+32*i+20]+df_20.iloc[:,1+32*i+21]\n",
    "                                    +df_20.iloc[:,1+32*i+22])/4\n",
    "    period_20[columns[i]+'_'+'yunsui']=df_20.iloc[:,1+32*i+23]\n",
    "    period_20[columns[i]+'_'+'chousui']=df_20.iloc[:,1+32*i+24]\n",
    "    period_20[columns[i]+'_'+'kaihua']=df_20.iloc[:,1+32*i+25]\n",
    "    period_20[columns[i]+'_'+'guanjiang']=(df_20.iloc[:,1+32*i+26]+df_20.iloc[:,1+32*i+27]+df_20.iloc[:,1+32*i+28]\n",
    "                                +df_20.iloc[:,1+32*i+29])/4\n",
    "    period_20[columns[i]+'_'+'chengshu']=(df_20.iloc[:,1+32*i+29]+df_20.iloc[:,1+32*i+30])/2\n",
    "    period_20[columns[i]+'_'+'shouhuo']=(df_20.iloc[:,1+32*i+30]+df_20.iloc[:,1+32*i+31])/2\n",
    "period_20['亩产']=df_20['2020年小麦亩产']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "badae91c-b233-4516-bbfa-d82fd5aba8b8",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>NAME</th>\n",
       "      <th>AvgSurfT_inst_bozhong</th>\n",
       "      <th>AvgSurfT_inst_chumiao</th>\n",
       "      <th>AvgSurfT_inst_fennie</th>\n",
       "      <th>AvgSurfT_inst_yuedong</th>\n",
       "      <th>AvgSurfT_inst_fanqing</th>\n",
       "      <th>AvgSurfT_inst_bajie</th>\n",
       "      <th>AvgSurfT_inst_yunsui</th>\n",
       "      <th>AvgSurfT_inst_chousui</th>\n",
       "      <th>AvgSurfT_inst_kaihua</th>\n",
       "      <th>...</th>\n",
       "      <th>wet_yuedong</th>\n",
       "      <th>wet_fanqing</th>\n",
       "      <th>wet_bajie</th>\n",
       "      <th>wet_yunsui</th>\n",
       "      <th>wet_chousui</th>\n",
       "      <th>wet_kaihua</th>\n",
       "      <th>wet_guanjiang</th>\n",
       "      <th>wet_chengshu</th>\n",
       "      <th>wet_shouhuo</th>\n",
       "      <th>亩产</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>410522</td>\n",
       "      <td>289.313124</td>\n",
       "      <td>287.678060</td>\n",
       "      <td>277.059194</td>\n",
       "      <td>273.416761</td>\n",
       "      <td>281.579683</td>\n",
       "      <td>284.538514</td>\n",
       "      <td>288.627335</td>\n",
       "      <td>288.888370</td>\n",
       "      <td>290.235822</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.132079</td>\n",
       "      <td>-0.128427</td>\n",
       "      <td>-0.116011</td>\n",
       "      <td>-0.117605</td>\n",
       "      <td>-0.124625</td>\n",
       "      <td>-0.085087</td>\n",
       "      <td>-0.102872</td>\n",
       "      <td>-0.137377</td>\n",
       "      <td>-0.188097</td>\n",
       "      <td>7421.059765</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>410421</td>\n",
       "      <td>289.350292</td>\n",
       "      <td>288.486203</td>\n",
       "      <td>279.357652</td>\n",
       "      <td>276.379945</td>\n",
       "      <td>282.617156</td>\n",
       "      <td>284.656210</td>\n",
       "      <td>287.488307</td>\n",
       "      <td>288.681462</td>\n",
       "      <td>289.327636</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.141617</td>\n",
       "      <td>-0.132977</td>\n",
       "      <td>-0.110309</td>\n",
       "      <td>-0.116465</td>\n",
       "      <td>-0.105958</td>\n",
       "      <td>-0.090472</td>\n",
       "      <td>-0.130274</td>\n",
       "      <td>-0.192853</td>\n",
       "      <td>-0.231545</td>\n",
       "      <td>5905.753158</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>411726</td>\n",
       "      <td>288.596064</td>\n",
       "      <td>287.852062</td>\n",
       "      <td>279.254586</td>\n",
       "      <td>276.777840</td>\n",
       "      <td>282.515575</td>\n",
       "      <td>284.418650</td>\n",
       "      <td>286.656538</td>\n",
       "      <td>287.906031</td>\n",
       "      <td>288.377523</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.154601</td>\n",
       "      <td>-0.143990</td>\n",
       "      <td>-0.115011</td>\n",
       "      <td>-0.139067</td>\n",
       "      <td>-0.128509</td>\n",
       "      <td>-0.110333</td>\n",
       "      <td>-0.131183</td>\n",
       "      <td>-0.184031</td>\n",
       "      <td>-0.217761</td>\n",
       "      <td>5681.763483</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>410822</td>\n",
       "      <td>290.224941</td>\n",
       "      <td>289.081234</td>\n",
       "      <td>278.873969</td>\n",
       "      <td>275.573085</td>\n",
       "      <td>282.534935</td>\n",
       "      <td>285.719891</td>\n",
       "      <td>288.808381</td>\n",
       "      <td>289.566382</td>\n",
       "      <td>290.741883</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.135413</td>\n",
       "      <td>-0.125759</td>\n",
       "      <td>-0.113077</td>\n",
       "      <td>-0.095139</td>\n",
       "      <td>-0.117875</td>\n",
       "      <td>-0.082004</td>\n",
       "      <td>-0.110335</td>\n",
       "      <td>-0.147489</td>\n",
       "      <td>-0.195316</td>\n",
       "      <td>7947.794351</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>411082</td>\n",
       "      <td>289.811414</td>\n",
       "      <td>288.820994</td>\n",
       "      <td>279.218751</td>\n",
       "      <td>276.401841</td>\n",
       "      <td>282.553255</td>\n",
       "      <td>284.761917</td>\n",
       "      <td>287.694106</td>\n",
       "      <td>287.998000</td>\n",
       "      <td>289.466445</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.154962</td>\n",
       "      <td>-0.132498</td>\n",
       "      <td>-0.113442</td>\n",
       "      <td>-0.109419</td>\n",
       "      <td>-0.102853</td>\n",
       "      <td>-0.095346</td>\n",
       "      <td>-0.125270</td>\n",
       "      <td>-0.181671</td>\n",
       "      <td>-0.219029</td>\n",
       "      <td>7840.499426</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>411081</td>\n",
       "      <td>289.567575</td>\n",
       "      <td>288.685815</td>\n",
       "      <td>279.180069</td>\n",
       "      <td>276.307077</td>\n",
       "      <td>282.333795</td>\n",
       "      <td>284.596469</td>\n",
       "      <td>287.773135</td>\n",
       "      <td>288.445465</td>\n",
       "      <td>289.302230</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.142956</td>\n",
       "      <td>-0.133181</td>\n",
       "      <td>-0.121905</td>\n",
       "      <td>-0.123076</td>\n",
       "      <td>-0.116323</td>\n",
       "      <td>-0.102790</td>\n",
       "      <td>-0.130688</td>\n",
       "      <td>-0.189824</td>\n",
       "      <td>-0.222189</td>\n",
       "      <td>6313.254305</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>411424</td>\n",
       "      <td>289.719357</td>\n",
       "      <td>288.854778</td>\n",
       "      <td>279.439687</td>\n",
       "      <td>276.139269</td>\n",
       "      <td>282.566409</td>\n",
       "      <td>284.595275</td>\n",
       "      <td>287.299443</td>\n",
       "      <td>287.051833</td>\n",
       "      <td>288.928245</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.142954</td>\n",
       "      <td>-0.138034</td>\n",
       "      <td>-0.122494</td>\n",
       "      <td>-0.104807</td>\n",
       "      <td>-0.100790</td>\n",
       "      <td>-0.079775</td>\n",
       "      <td>-0.110940</td>\n",
       "      <td>-0.162114</td>\n",
       "      <td>-0.211154</td>\n",
       "      <td>7518.110047</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>411724</td>\n",
       "      <td>289.586079</td>\n",
       "      <td>288.840160</td>\n",
       "      <td>279.989157</td>\n",
       "      <td>277.195342</td>\n",
       "      <td>283.089181</td>\n",
       "      <td>284.706872</td>\n",
       "      <td>286.936085</td>\n",
       "      <td>287.719709</td>\n",
       "      <td>289.390978</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.147392</td>\n",
       "      <td>-0.142498</td>\n",
       "      <td>-0.116799</td>\n",
       "      <td>-0.088785</td>\n",
       "      <td>-0.092058</td>\n",
       "      <td>-0.087587</td>\n",
       "      <td>-0.108332</td>\n",
       "      <td>-0.183484</td>\n",
       "      <td>-0.217556</td>\n",
       "      <td>5669.699928</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>411324</td>\n",
       "      <td>289.148336</td>\n",
       "      <td>288.682899</td>\n",
       "      <td>279.931778</td>\n",
       "      <td>277.248133</td>\n",
       "      <td>282.750532</td>\n",
       "      <td>284.547516</td>\n",
       "      <td>286.575649</td>\n",
       "      <td>287.883894</td>\n",
       "      <td>289.099950</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.143437</td>\n",
       "      <td>-0.142620</td>\n",
       "      <td>-0.100577</td>\n",
       "      <td>-0.143594</td>\n",
       "      <td>-0.115556</td>\n",
       "      <td>-0.102123</td>\n",
       "      <td>-0.116770</td>\n",
       "      <td>-0.160445</td>\n",
       "      <td>-0.210615</td>\n",
       "      <td>5410.968231</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>410122</td>\n",
       "      <td>289.693800</td>\n",
       "      <td>288.662103</td>\n",
       "      <td>278.944581</td>\n",
       "      <td>275.955387</td>\n",
       "      <td>282.360519</td>\n",
       "      <td>285.021568</td>\n",
       "      <td>288.333140</td>\n",
       "      <td>288.403018</td>\n",
       "      <td>289.629754</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.145892</td>\n",
       "      <td>-0.138091</td>\n",
       "      <td>-0.116971</td>\n",
       "      <td>-0.129252</td>\n",
       "      <td>-0.123039</td>\n",
       "      <td>-0.102177</td>\n",
       "      <td>-0.128923</td>\n",
       "      <td>-0.152955</td>\n",
       "      <td>-0.188088</td>\n",
       "      <td>6424.030354</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>102 rows × 386 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       NAME  AvgSurfT_inst_bozhong  AvgSurfT_inst_chumiao   \n",
       "0    410522             289.313124             287.678060  \\\n",
       "1    410421             289.350292             288.486203   \n",
       "2    411726             288.596064             287.852062   \n",
       "3    410822             290.224941             289.081234   \n",
       "4    411082             289.811414             288.820994   \n",
       "..      ...                    ...                    ...   \n",
       "97   411081             289.567575             288.685815   \n",
       "98   411424             289.719357             288.854778   \n",
       "99   411724             289.586079             288.840160   \n",
       "100  411324             289.148336             288.682899   \n",
       "101  410122             289.693800             288.662103   \n",
       "\n",
       "     AvgSurfT_inst_fennie  AvgSurfT_inst_yuedong  AvgSurfT_inst_fanqing   \n",
       "0              277.059194             273.416761             281.579683  \\\n",
       "1              279.357652             276.379945             282.617156   \n",
       "2              279.254586             276.777840             282.515575   \n",
       "3              278.873969             275.573085             282.534935   \n",
       "4              279.218751             276.401841             282.553255   \n",
       "..                    ...                    ...                    ...   \n",
       "97             279.180069             276.307077             282.333795   \n",
       "98             279.439687             276.139269             282.566409   \n",
       "99             279.989157             277.195342             283.089181   \n",
       "100            279.931778             277.248133             282.750532   \n",
       "101            278.944581             275.955387             282.360519   \n",
       "\n",
       "     AvgSurfT_inst_bajie  AvgSurfT_inst_yunsui  AvgSurfT_inst_chousui   \n",
       "0             284.538514            288.627335             288.888370  \\\n",
       "1             284.656210            287.488307             288.681462   \n",
       "2             284.418650            286.656538             287.906031   \n",
       "3             285.719891            288.808381             289.566382   \n",
       "4             284.761917            287.694106             287.998000   \n",
       "..                   ...                   ...                    ...   \n",
       "97            284.596469            287.773135             288.445465   \n",
       "98            284.595275            287.299443             287.051833   \n",
       "99            284.706872            286.936085             287.719709   \n",
       "100           284.547516            286.575649             287.883894   \n",
       "101           285.021568            288.333140             288.403018   \n",
       "\n",
       "     AvgSurfT_inst_kaihua  ...  wet_yuedong  wet_fanqing  wet_bajie   \n",
       "0              290.235822  ...    -0.132079    -0.128427  -0.116011  \\\n",
       "1              289.327636  ...    -0.141617    -0.132977  -0.110309   \n",
       "2              288.377523  ...    -0.154601    -0.143990  -0.115011   \n",
       "3              290.741883  ...    -0.135413    -0.125759  -0.113077   \n",
       "4              289.466445  ...    -0.154962    -0.132498  -0.113442   \n",
       "..                    ...  ...          ...          ...        ...   \n",
       "97             289.302230  ...    -0.142956    -0.133181  -0.121905   \n",
       "98             288.928245  ...    -0.142954    -0.138034  -0.122494   \n",
       "99             289.390978  ...    -0.147392    -0.142498  -0.116799   \n",
       "100            289.099950  ...    -0.143437    -0.142620  -0.100577   \n",
       "101            289.629754  ...    -0.145892    -0.138091  -0.116971   \n",
       "\n",
       "     wet_yunsui  wet_chousui  wet_kaihua  wet_guanjiang  wet_chengshu   \n",
       "0     -0.117605    -0.124625   -0.085087      -0.102872     -0.137377  \\\n",
       "1     -0.116465    -0.105958   -0.090472      -0.130274     -0.192853   \n",
       "2     -0.139067    -0.128509   -0.110333      -0.131183     -0.184031   \n",
       "3     -0.095139    -0.117875   -0.082004      -0.110335     -0.147489   \n",
       "4     -0.109419    -0.102853   -0.095346      -0.125270     -0.181671   \n",
       "..          ...          ...         ...            ...           ...   \n",
       "97    -0.123076    -0.116323   -0.102790      -0.130688     -0.189824   \n",
       "98    -0.104807    -0.100790   -0.079775      -0.110940     -0.162114   \n",
       "99    -0.088785    -0.092058   -0.087587      -0.108332     -0.183484   \n",
       "100   -0.143594    -0.115556   -0.102123      -0.116770     -0.160445   \n",
       "101   -0.129252    -0.123039   -0.102177      -0.128923     -0.152955   \n",
       "\n",
       "     wet_shouhuo           亩产  \n",
       "0      -0.188097  7421.059765  \n",
       "1      -0.231545  5905.753158  \n",
       "2      -0.217761  5681.763483  \n",
       "3      -0.195316  7947.794351  \n",
       "4      -0.219029  7840.499426  \n",
       "..           ...          ...  \n",
       "97     -0.222189  6313.254305  \n",
       "98     -0.211154  7518.110047  \n",
       "99     -0.217556  5669.699928  \n",
       "100    -0.210615  5410.968231  \n",
       "101    -0.188088  6424.030354  \n",
       "\n",
       "[102 rows x 386 columns]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "period_20"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c9619768-98a9-4468-8a75-b5b4cb61286d",
   "metadata": {},
   "source": [
    "### 2021"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "04767003-fbca-40bf-8fa7-80846b145991",
   "metadata": {},
   "outputs": [],
   "source": [
    "period_21 = pd.DataFrame()\n",
    "period_21['NAME']=df_21['NAME']\n",
    "for i in range(32):\n",
    "    period_21[columns[i]+'_'+'bozhong']=(df_21.iloc[:,1+32*i+0]+df_21.iloc[:,1+32*i+1])/2\n",
    "    period_21[columns[i]+'_'+'chumiao']=(df_21.iloc[:,1+32*i+1]+df_21.iloc[:,1+32*i+2]+df_21.iloc[:,1+32*i+3])/3\n",
    "    period_21[columns[i]+'_'+'fennie']=(df_21.iloc[:,1+32*i+3]+df_21.iloc[:,1+32*i+4]+df_21.iloc[:,1+32*i+5]+df_21.iloc[:,1+32*i+6]\n",
    "                                   +df_21.iloc[:,1+32*i+7]+df_21.iloc[:,1+32*i+8]+df_21.iloc[:,1+32*i+9])/7\n",
    "    period_21[columns[i]+'_'+'yuedong']=(df_21.iloc[:,1+32*i+10]+df_21.iloc[:,1+32*i+11]+df_21.iloc[:,1+32*i+12]\n",
    "                                    +df_21.iloc[:,1+32*i+13]+df_21.iloc[:,1+32*i+14])/5\n",
    "    period_21[columns[i]+'_'+'fanqing']=(df_21.iloc[:,1+32*i+15]+df_21.iloc[:,1+32*i+16]+df_21.iloc[:,1+32*i+17]\n",
    "                                    +df_21.iloc[:,1+32*i+18])/4\n",
    "    period_21[columns[i]+'_'+'bajie']=(df_21.iloc[:,1+32*i+19]+df_21.iloc[:,1+32*i+20]+df_21.iloc[:,1+32*i+21]\n",
    "                                    +df_21.iloc[:,1+32*i+22])/4\n",
    "    period_21[columns[i]+'_'+'yunsui']=df_21.iloc[:,1+32*i+23]\n",
    "    period_21[columns[i]+'_'+'chousui']=df_21.iloc[:,1+32*i+24]\n",
    "    period_21[columns[i]+'_'+'kaihua']=df_21.iloc[:,1+32*i+25]\n",
    "    period_21[columns[i]+'_'+'guanjiang']=(df_21.iloc[:,1+32*i+26]+df_21.iloc[:,1+32*i+27]+df_21.iloc[:,1+32*i+28]\n",
    "                                +df_21.iloc[:,1+32*i+29])/4\n",
    "    period_21[columns[i]+'_'+'chengshu']=(df_21.iloc[:,1+32*i+29]+df_21.iloc[:,1+32*i+30])/2\n",
    "    period_21[columns[i]+'_'+'shouhuo']=(df_21.iloc[:,1+32*i+30]+df_21.iloc[:,1+32*i+31])/2\n",
    "period_21['亩产']=df_21['2021年小麦亩产']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "36d6d673-596f-4833-8a83-d910d0560473",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>NAME</th>\n",
       "      <th>AvgSurfT_inst_bozhong</th>\n",
       "      <th>AvgSurfT_inst_chumiao</th>\n",
       "      <th>AvgSurfT_inst_fennie</th>\n",
       "      <th>AvgSurfT_inst_yuedong</th>\n",
       "      <th>AvgSurfT_inst_fanqing</th>\n",
       "      <th>AvgSurfT_inst_bajie</th>\n",
       "      <th>AvgSurfT_inst_yunsui</th>\n",
       "      <th>AvgSurfT_inst_chousui</th>\n",
       "      <th>AvgSurfT_inst_kaihua</th>\n",
       "      <th>...</th>\n",
       "      <th>wet_yuedong</th>\n",
       "      <th>wet_fanqing</th>\n",
       "      <th>wet_bajie</th>\n",
       "      <th>wet_yunsui</th>\n",
       "      <th>wet_chousui</th>\n",
       "      <th>wet_kaihua</th>\n",
       "      <th>wet_guanjiang</th>\n",
       "      <th>wet_chengshu</th>\n",
       "      <th>wet_shouhuo</th>\n",
       "      <th>亩产</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>410522</td>\n",
       "      <td>286.002115</td>\n",
       "      <td>285.136248</td>\n",
       "      <td>279.001088</td>\n",
       "      <td>274.022127</td>\n",
       "      <td>278.003965</td>\n",
       "      <td>285.072290</td>\n",
       "      <td>291.887190</td>\n",
       "      <td>289.304662</td>\n",
       "      <td>291.163222</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.134862</td>\n",
       "      <td>-0.114958</td>\n",
       "      <td>-0.085560</td>\n",
       "      <td>-0.111602</td>\n",
       "      <td>-0.114125</td>\n",
       "      <td>-0.090609</td>\n",
       "      <td>-0.095221</td>\n",
       "      <td>-0.113420</td>\n",
       "      <td>-0.166588</td>\n",
       "      <td>7467.000138</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>410421</td>\n",
       "      <td>286.855422</td>\n",
       "      <td>286.503450</td>\n",
       "      <td>281.405433</td>\n",
       "      <td>275.892298</td>\n",
       "      <td>278.765320</td>\n",
       "      <td>286.270067</td>\n",
       "      <td>292.098793</td>\n",
       "      <td>289.461760</td>\n",
       "      <td>291.274758</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.106721</td>\n",
       "      <td>-0.128980</td>\n",
       "      <td>-0.104943</td>\n",
       "      <td>-0.113114</td>\n",
       "      <td>-0.099330</td>\n",
       "      <td>-0.088144</td>\n",
       "      <td>-0.132389</td>\n",
       "      <td>-0.182242</td>\n",
       "      <td>-0.204953</td>\n",
       "      <td>5972.666001</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>411726</td>\n",
       "      <td>286.565263</td>\n",
       "      <td>286.461806</td>\n",
       "      <td>281.557859</td>\n",
       "      <td>276.339610</td>\n",
       "      <td>278.933180</td>\n",
       "      <td>286.144884</td>\n",
       "      <td>291.003094</td>\n",
       "      <td>288.314523</td>\n",
       "      <td>290.375242</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.118003</td>\n",
       "      <td>-0.158054</td>\n",
       "      <td>-0.136070</td>\n",
       "      <td>-0.133379</td>\n",
       "      <td>-0.119200</td>\n",
       "      <td>-0.107184</td>\n",
       "      <td>-0.147784</td>\n",
       "      <td>-0.199360</td>\n",
       "      <td>-0.215028</td>\n",
       "      <td>5687.791498</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>410822</td>\n",
       "      <td>286.869123</td>\n",
       "      <td>286.221083</td>\n",
       "      <td>280.291876</td>\n",
       "      <td>275.167994</td>\n",
       "      <td>278.585774</td>\n",
       "      <td>286.615916</td>\n",
       "      <td>291.952309</td>\n",
       "      <td>289.275279</td>\n",
       "      <td>291.701369</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.094403</td>\n",
       "      <td>-0.104732</td>\n",
       "      <td>-0.103377</td>\n",
       "      <td>-0.098178</td>\n",
       "      <td>-0.095190</td>\n",
       "      <td>-0.062063</td>\n",
       "      <td>-0.103120</td>\n",
       "      <td>-0.125755</td>\n",
       "      <td>-0.183153</td>\n",
       "      <td>7959.597222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>411082</td>\n",
       "      <td>287.420362</td>\n",
       "      <td>287.003926</td>\n",
       "      <td>281.318966</td>\n",
       "      <td>275.833700</td>\n",
       "      <td>278.722733</td>\n",
       "      <td>285.845544</td>\n",
       "      <td>291.705319</td>\n",
       "      <td>289.474700</td>\n",
       "      <td>291.566016</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.111498</td>\n",
       "      <td>-0.112405</td>\n",
       "      <td>-0.104610</td>\n",
       "      <td>-0.104227</td>\n",
       "      <td>-0.086986</td>\n",
       "      <td>-0.074036</td>\n",
       "      <td>-0.110435</td>\n",
       "      <td>-0.158486</td>\n",
       "      <td>-0.205677</td>\n",
       "      <td>7662.496889</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>411081</td>\n",
       "      <td>287.180651</td>\n",
       "      <td>286.652207</td>\n",
       "      <td>281.298333</td>\n",
       "      <td>275.706372</td>\n",
       "      <td>278.629722</td>\n",
       "      <td>285.917590</td>\n",
       "      <td>291.771018</td>\n",
       "      <td>289.443046</td>\n",
       "      <td>291.456563</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.108407</td>\n",
       "      <td>-0.130190</td>\n",
       "      <td>-0.114653</td>\n",
       "      <td>-0.113705</td>\n",
       "      <td>-0.101433</td>\n",
       "      <td>-0.090942</td>\n",
       "      <td>-0.125796</td>\n",
       "      <td>-0.168618</td>\n",
       "      <td>-0.202961</td>\n",
       "      <td>6613.422500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>411424</td>\n",
       "      <td>287.783579</td>\n",
       "      <td>287.221926</td>\n",
       "      <td>281.475295</td>\n",
       "      <td>276.494386</td>\n",
       "      <td>279.002899</td>\n",
       "      <td>285.828942</td>\n",
       "      <td>290.859836</td>\n",
       "      <td>289.191530</td>\n",
       "      <td>291.693858</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.129101</td>\n",
       "      <td>-0.134475</td>\n",
       "      <td>-0.113446</td>\n",
       "      <td>-0.098273</td>\n",
       "      <td>-0.083847</td>\n",
       "      <td>-0.074186</td>\n",
       "      <td>-0.112556</td>\n",
       "      <td>-0.190355</td>\n",
       "      <td>-0.239978</td>\n",
       "      <td>7579.469809</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>411724</td>\n",
       "      <td>288.002363</td>\n",
       "      <td>287.766777</td>\n",
       "      <td>282.749032</td>\n",
       "      <td>277.388221</td>\n",
       "      <td>279.165193</td>\n",
       "      <td>286.336407</td>\n",
       "      <td>290.680463</td>\n",
       "      <td>288.808626</td>\n",
       "      <td>291.057662</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.147732</td>\n",
       "      <td>-0.146559</td>\n",
       "      <td>-0.122437</td>\n",
       "      <td>-0.084108</td>\n",
       "      <td>-0.076640</td>\n",
       "      <td>-0.079914</td>\n",
       "      <td>-0.107206</td>\n",
       "      <td>-0.180355</td>\n",
       "      <td>-0.213523</td>\n",
       "      <td>5754.140236</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>411324</td>\n",
       "      <td>287.172791</td>\n",
       "      <td>286.740241</td>\n",
       "      <td>282.195633</td>\n",
       "      <td>276.891597</td>\n",
       "      <td>279.084789</td>\n",
       "      <td>286.036824</td>\n",
       "      <td>290.792116</td>\n",
       "      <td>287.861658</td>\n",
       "      <td>290.492205</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.128480</td>\n",
       "      <td>-0.135991</td>\n",
       "      <td>-0.126295</td>\n",
       "      <td>-0.104355</td>\n",
       "      <td>-0.114538</td>\n",
       "      <td>-0.097445</td>\n",
       "      <td>-0.133700</td>\n",
       "      <td>-0.196596</td>\n",
       "      <td>-0.218984</td>\n",
       "      <td>5467.128359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>410122</td>\n",
       "      <td>286.813491</td>\n",
       "      <td>286.392665</td>\n",
       "      <td>280.817095</td>\n",
       "      <td>275.484389</td>\n",
       "      <td>278.765531</td>\n",
       "      <td>285.972636</td>\n",
       "      <td>292.067280</td>\n",
       "      <td>289.607268</td>\n",
       "      <td>291.446007</td>\n",
       "      <td>...</td>\n",
       "      <td>-0.125752</td>\n",
       "      <td>-0.113046</td>\n",
       "      <td>-0.102704</td>\n",
       "      <td>-0.116608</td>\n",
       "      <td>-0.103619</td>\n",
       "      <td>-0.095178</td>\n",
       "      <td>-0.125416</td>\n",
       "      <td>-0.147833</td>\n",
       "      <td>-0.175365</td>\n",
       "      <td>6637.200003</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>102 rows × 386 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       NAME  AvgSurfT_inst_bozhong  AvgSurfT_inst_chumiao   \n",
       "0    410522             286.002115             285.136248  \\\n",
       "1    410421             286.855422             286.503450   \n",
       "2    411726             286.565263             286.461806   \n",
       "3    410822             286.869123             286.221083   \n",
       "4    411082             287.420362             287.003926   \n",
       "..      ...                    ...                    ...   \n",
       "97   411081             287.180651             286.652207   \n",
       "98   411424             287.783579             287.221926   \n",
       "99   411724             288.002363             287.766777   \n",
       "100  411324             287.172791             286.740241   \n",
       "101  410122             286.813491             286.392665   \n",
       "\n",
       "     AvgSurfT_inst_fennie  AvgSurfT_inst_yuedong  AvgSurfT_inst_fanqing   \n",
       "0              279.001088             274.022127             278.003965  \\\n",
       "1              281.405433             275.892298             278.765320   \n",
       "2              281.557859             276.339610             278.933180   \n",
       "3              280.291876             275.167994             278.585774   \n",
       "4              281.318966             275.833700             278.722733   \n",
       "..                    ...                    ...                    ...   \n",
       "97             281.298333             275.706372             278.629722   \n",
       "98             281.475295             276.494386             279.002899   \n",
       "99             282.749032             277.388221             279.165193   \n",
       "100            282.195633             276.891597             279.084789   \n",
       "101            280.817095             275.484389             278.765531   \n",
       "\n",
       "     AvgSurfT_inst_bajie  AvgSurfT_inst_yunsui  AvgSurfT_inst_chousui   \n",
       "0             285.072290            291.887190             289.304662  \\\n",
       "1             286.270067            292.098793             289.461760   \n",
       "2             286.144884            291.003094             288.314523   \n",
       "3             286.615916            291.952309             289.275279   \n",
       "4             285.845544            291.705319             289.474700   \n",
       "..                   ...                   ...                    ...   \n",
       "97            285.917590            291.771018             289.443046   \n",
       "98            285.828942            290.859836             289.191530   \n",
       "99            286.336407            290.680463             288.808626   \n",
       "100           286.036824            290.792116             287.861658   \n",
       "101           285.972636            292.067280             289.607268   \n",
       "\n",
       "     AvgSurfT_inst_kaihua  ...  wet_yuedong  wet_fanqing  wet_bajie   \n",
       "0              291.163222  ...    -0.134862    -0.114958  -0.085560  \\\n",
       "1              291.274758  ...    -0.106721    -0.128980  -0.104943   \n",
       "2              290.375242  ...    -0.118003    -0.158054  -0.136070   \n",
       "3              291.701369  ...    -0.094403    -0.104732  -0.103377   \n",
       "4              291.566016  ...    -0.111498    -0.112405  -0.104610   \n",
       "..                    ...  ...          ...          ...        ...   \n",
       "97             291.456563  ...    -0.108407    -0.130190  -0.114653   \n",
       "98             291.693858  ...    -0.129101    -0.134475  -0.113446   \n",
       "99             291.057662  ...    -0.147732    -0.146559  -0.122437   \n",
       "100            290.492205  ...    -0.128480    -0.135991  -0.126295   \n",
       "101            291.446007  ...    -0.125752    -0.113046  -0.102704   \n",
       "\n",
       "     wet_yunsui  wet_chousui  wet_kaihua  wet_guanjiang  wet_chengshu   \n",
       "0     -0.111602    -0.114125   -0.090609      -0.095221     -0.113420  \\\n",
       "1     -0.113114    -0.099330   -0.088144      -0.132389     -0.182242   \n",
       "2     -0.133379    -0.119200   -0.107184      -0.147784     -0.199360   \n",
       "3     -0.098178    -0.095190   -0.062063      -0.103120     -0.125755   \n",
       "4     -0.104227    -0.086986   -0.074036      -0.110435     -0.158486   \n",
       "..          ...          ...         ...            ...           ...   \n",
       "97    -0.113705    -0.101433   -0.090942      -0.125796     -0.168618   \n",
       "98    -0.098273    -0.083847   -0.074186      -0.112556     -0.190355   \n",
       "99    -0.084108    -0.076640   -0.079914      -0.107206     -0.180355   \n",
       "100   -0.104355    -0.114538   -0.097445      -0.133700     -0.196596   \n",
       "101   -0.116608    -0.103619   -0.095178      -0.125416     -0.147833   \n",
       "\n",
       "     wet_shouhuo           亩产  \n",
       "0      -0.166588  7467.000138  \n",
       "1      -0.204953  5972.666001  \n",
       "2      -0.215028  5687.791498  \n",
       "3      -0.183153  7959.597222  \n",
       "4      -0.205677  7662.496889  \n",
       "..           ...          ...  \n",
       "97     -0.202961  6613.422500  \n",
       "98     -0.239978  7579.469809  \n",
       "99     -0.213523  5754.140236  \n",
       "100    -0.218984  5467.128359  \n",
       "101    -0.175365  6637.200003  \n",
       "\n",
       "[102 rows x 386 columns]"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "period_21"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "cfd1c9b6-6344-4f2e-a72e-bc4d12c65757",
   "metadata": {},
   "outputs": [],
   "source": [
    "merged_df = pd.concat([period_21,period_20,period_19,period_18,period_17,period_16], axis=0, ignore_index=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "b7c6b12f-ab65-4bb1-94dc-0f09eb61984b",
   "metadata": {},
   "outputs": [],
   "source": [
    "merged_df1 = pd.concat([period_20,period_19,period_18,period_17,period_16], axis=0, ignore_index=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "af7f9408-b9fb-4cda-8e5a-3c2d2c2d024a",
   "metadata": {},
   "outputs": [],
   "source": [
    "merged_df.to_excel(r'数据\\修正数据.xlsx')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "ab2ce52a-ef60-4953-a6c4-12d9b9c019ff",
   "metadata": {},
   "outputs": [],
   "source": [
    "merged_df1.to_excel(r'数据\\修正数据1.xlsx')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "0e7d8d08-2c66-4b0c-a545-573dad5feec2",
   "metadata": {},
   "outputs": [],
   "source": [
    "period_21.to_excel(r'数据\\21年数据.xlsx')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "d0ade338-7397-43a0-a7e0-80a070183ee9",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "period_16.to_excel(r'数据\\16 year.xlsx')\n",
    "period_17.to_excel(r'数据\\17 year.xlsx')\n",
    "period_18.to_excel(r'数据\\18 year.xlsx')\n",
    "period_19.to_excel(r'数据\\19 year.xlsx')\n",
    "period_20.to_excel(r'数据\\20 year.xlsx')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2ac128ad-cc7d-49b8-b2f3-1ee8aa76470a",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
